Hi, This code works when I am querying an Access database. However, I have recently created a database on an SQL 2000 Server. The DSN works and i can connect to the database, but I can't draw a recordset from it. This is the code:
<%
Dim conn, rs
Set conn = Server.CreateObject("ADODB.Connection"
conn.Open "DSN=helpdeskdb"
set rs=Server.CreateObject("ADODB.recordset"
rs.Open "Select * from user", conn
%>
The error I get is a 500.100 which says -
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'user'.
/test.asp, line 7
I reckon this is probably an easy one to solve. Any help would be appreciated.
<%
Dim conn, rs
Set conn = Server.CreateObject("ADODB.Connection"
conn.Open "DSN=helpdeskdb"
set rs=Server.CreateObject("ADODB.recordset"
rs.Open "Select * from user", conn
%>
The error I get is a 500.100 which says -
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'user'.
/test.asp, line 7
I reckon this is probably an easy one to solve. Any help would be appreciated.