I have this code which works fine
<%
Set fp_conn = Server.CreateObject("ADODB.Connection"
Set fp_rs = Server.CreateObject("ADODB.Recordset"
fp_conn.Open Application("tellusaboutyou_ConnectionString"
fp_rs.Open "test", fp_conn, 1, 3, 2 ' adOpenKeySet, adLockOptimistic, adCmdTable
fp_rs.movefirst
Response.Write "Name: " & fp_rs("name"
fp_rs.Close
fp_conn.Close
%>
But rather than open the table I want to be able to open a recordset using a SQL string like so
SQLString = "Select * from test"
but this gives the error
-------------------
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error in FROM clause.
/test.asp, line 17
---------------------
....
SQLString = "Select * from test"
fp_rs.Open SQLString, fp_conn, 1, 3, 2 ' adOpenKeySet, adLockOptimistic, adCmdTable
---------------------------------
this is line 17
fp_rs.Open SQLString ....
Can you advise on the correct syntax ????
DougP, MCP
Visit my WEB site to see how Bar-codes can help you be more productive
<%
Set fp_conn = Server.CreateObject("ADODB.Connection"
Set fp_rs = Server.CreateObject("ADODB.Recordset"
fp_conn.Open Application("tellusaboutyou_ConnectionString"
fp_rs.Open "test", fp_conn, 1, 3, 2 ' adOpenKeySet, adLockOptimistic, adCmdTable
fp_rs.movefirst
Response.Write "Name: " & fp_rs("name"
fp_rs.Close
fp_conn.Close
%>
But rather than open the table I want to be able to open a recordset using a SQL string like so
SQLString = "Select * from test"
but this gives the error
-------------------
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error in FROM clause.
/test.asp, line 17
---------------------
....
SQLString = "Select * from test"
fp_rs.Open SQLString, fp_conn, 1, 3, 2 ' adOpenKeySet, adLockOptimistic, adCmdTable
---------------------------------
this is line 17
fp_rs.Open SQLString ....
Can you advise on the correct syntax ????
DougP, MCP
Visit my WEB site to see how Bar-codes can help you be more productive