February 2nd, 2004, 02:55 PM
SQL Server Problem
I have just migrated my Access DB to SQL Server. Now, I want to access my ASP pages with it. So, I have successfully changed the connection string, and the ODBC connection (after some time).
Now, I get a very strange error, stating:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'USER'.
/index2.asp, line 20
The original source code is:
SQL="SELECT * FROM USER"
'SQL="SELECT * FROM User ORDER BY User_Name ASC"
Set RS = Conn.Execute(SQL)
where the last line is line 20. The actual SQL String I want to use is in line 19, but I thought the ORDER BY could be the prob, so I changed this. Still, even with the very simple statement in line 18, same error.
Please note that it all worked in Access, so it cannot be a problem of wrong code, etc. Unless the migration went wrong. How could I check that....?
February 2nd, 2004, 04:02 PM
User is a reserverd word in SQL. Rename the table.
February 3rd, 2004, 06:42 AM