Hi. I'm not really a schollar in this subject. That's why I'm kind of learning while programming. This is the problem I have. I connect my APP to Microsoft SQL Server 7.0 through ODBC.
Then I make the queries I need with no problem. However I can not insert new info in my tables. This is how I'm tryingCode:Dim DSN As String, UID As String, DBF As String DSN = String$(255, 0) UID = String$(255, 0) DBF = String$(255, 0) connect$ = "ODBC;DSN=academica32;UID=sa;DATABASE=academica" Set db = OpenDatabase("", False, False, connect$) db.QueryTimeout = 20000
where SQLStatement is a string variable, and its value is the query statement. Aparently there's no problem with the statement, because if I send the SQLStatement to the clipboard and paste it in Microsoft ISQL/W seems to work. At least, the info is added. Has anybody any idea?. Here is the "table definition" and an example of the SQLStatement I tried:Code:Set rs = db.OpenRecordset(SQLStatement, dbOpenDynaset, dbSQLPassThrough)
Definition:
SQLStatement exampleCode:CREATE TABLE fnl (nu_lega varchar(7) NOT NULL, co_mate varchar(6) NOT NULL, nu_libro varchar(3) NOT NULL, nu_folio varchar(3) NOT NULL, fe_exa datetime NULL, no_exa varchar(2) NULL, fl_fnl_tpa varchar(1) NOT NULL, co_espe varchar(2) NOT NULL, co_curso varchar(5) NULL, an_lectivo varchar(4) NULL, co_estado varchar(2) NULL, co_control varchar(21) NULL)
Code:INSERT INTO fnl_tpa VALUES ('1053840', '954444', '95444', '250', CONVERT (varchar(16), '05/22/2000' ,113), NULL, 'T', 'R', 'R4444', '2000', '1', 'Emiliano')![]()
Why this "query" does work on Microsoft ISQL/w but doesn't on my APP??


image).
Reply With Quote
