I'm using the following code:
VB Code:
rs.Open "SELECT * FROM " & lvwGroups.SelectedItem & " ORDER BY Name", dtaVolumes.ConnectionString, adOpenKeyset, adLockReadOnly
The error is as follows:
Syntax error in FROM clause
I looked it up on MSDN, and it says this error is caused by a table having the name of a reserved keyword in SQL. I changed the table name to something like "Test" just to test it, and STILL got the error! Now I know that the word Test is definitely not used in SQL. What's wrong?




Reply With Quote