What's wrong with the sql ?

Hello,

When I use the following sql, there is error an error.
SelectCmd = "select * from table1 where id = 'test'"
But if I use
SelectCmd = "select * from table1", it can run. What's the problem ?Well, you could start by providing us with the error you are receiving. First guess would be that "id" is not an existing column in the table you are attempting to access, else I am not certain but I would guess that "id" is a keyword in the SQL language, perhaps you should try "[id]".SelectCmd = "select * from table1 where id = 'test'"

am I safe to assume id is an integer, not a string?Seems a bit too obvious... but who knows?
 
Back
Top