Each time I try to create a recordset based on a query, I get the above error. For example:
strQuery = "SELECT Surname FROM [Indi]"
rstPeople.Open strQuery, cnnFamily, adOpenKeyset, _
The only way which works is
rstPeople.Open "Indi", cnnFamily, adOpenKeyset, _
Microsoft acknowledges that problem in http://support.microsoft.com/support/kb/articles/q181/4/89.asp
, but says the following:
The table name is a SQL reserved word, such as "Orders."
Change the table name to a non-reserved word, such as "Orders" or place square brackets
around the name as follows:
As you see, I am using the brackets, but they don't help.
I am using VB 6 (SP3) with ADO 2.1.