Hello,
I'm having a few problems querying a database using the ADO object.
I've created a recordset object and when I run the following code it all works fine...
It returns a everything in the table, if I do this...
I get a table with only the names in it, however if I do this...
I get a sql syntax error even though from what I've read on the net you this should work.
Can anyone let me know where I've gone wrong?
Cheers!
I'm having a few problems querying a database using the ADO object.
I've created a recordset object and when I run the following code it all works fine...
Code:
dbRecordSet.Open "SELECT * FROM Staff_List;", cnt, adOpenStatic, adLockOptimistic
It returns a everything in the table, if I do this...
Code:
dbRecordSet.Open "SELECT Name FROM Staff_List;", cnt, adOpenStatic, adLockOptimistic
I get a table with only the names in it, however if I do this...
Code:
dbRecordSet.Open "SELECT Names, Band FROM Staff_List;", cnt, adOpenStatic, adLockOptimistic
I get a sql syntax error even though from what I've read on the net you this should work.
Can anyone let me know where I've gone wrong?
Cheers!