Message 1 of 9
SQL Error Please help
Not applicable
08-14-2003
10:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have an ADO connection to a MDB. I can open my tables. But when I try
and run query on table I keep getting error. I have attach some of the code
in event someone can help me with statement.
ptdesc = "any string"
curconn.Open CurrentProject.Connection
sqlstmt = "SELECT Codes.Code, Codes.Description FROM Codes WHERE
(((Codes.Code)= ptdesc));"
RSCode.Open sqlstmt, curconn, adOpenDynamic, adLockOptimistic,-1
The fields in the table are all strings. I think error is in the -1, VBA
show this as an option. But says -1 is LONG. I don't know what string is,
but I don't know if this is the problem or not.
and run query on table I keep getting error. I have attach some of the code
in event someone can help me with statement.
ptdesc = "any string"
curconn.Open CurrentProject.Connection
sqlstmt = "SELECT Codes.Code, Codes.Description FROM Codes WHERE
(((Codes.Code)= ptdesc));"
RSCode.Open sqlstmt, curconn, adOpenDynamic, adLockOptimistic,-1
The fields in the table are all strings. I think error is in the -1, VBA
show this as an option. But says -1 is LONG. I don't know what string is,
but I don't know if this is the problem or not.