View Single Post
 
Old May 17th, 2005, 09:00 AM
SKE SKE is offline
Authorized User
 
Join Date: Mar 2005
Location: , , .
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default Open a table selected in a html form

I need to open a table whose name has been typed in a form but I get this error :


Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Syntax error in FROM clause.



This is my script :

dim strexhib
strexhib = request.form("exhibition")

Set Conn=Server.CreateObject("ADODB.Connection")
strConn="driver={Microsoft Access Driver (*.mdb)}; "
strConn=strConn & " DBQ=" & Server.MapPath("exhibitions.mdb")
strConn=strConn & ";pwd=" & strCode
Conn.Open strConn

sql = "SELECT * FROM " & strexhib

Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn ,3,3


Any help really appreciated !!!
Ske