#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    40
    Rep Power
    12

    SQL Server Problem


    Hello,

    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....?

    Thank you,

    Helge
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2003
    Location
    Paris Uppland
    Posts
    2,385
    Rep Power
    391
    User is a reserverd word in SQL. Rename the table.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    40
    Rep Power
    12
    Thank you. That worked.

IMN logo majestic logo threadwatch logo seochat tools logo