Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access ASP
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access ASP Using ASP with Microsoft Access databases. For Access questions not specific to ASP, please use the Access forum. For more ASP forums, please see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access ASP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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

Reply With Quote
  #2 (permalink)  
Old May 17th, 2005, 11:17 PM
Friend of Wrox
 
Join Date: Apr 2005
Location: Cochin, , India.
Posts: 186
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi,

Did you try with

sql = "SELECT * FROM " & CSTR(strexhib)

Prashant


Reply With Quote
  #3 (permalink)  
Old May 18th, 2005, 10:22 AM
SKE SKE is offline
Authorized User
 
Join Date: Mar 2005
Location: , , .
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I tried your piece of code but it still doesn't work. Keeps telling me that there's an error in the FORM line.

Reply With Quote
  #4 (permalink)  
Old May 19th, 2005, 01:40 AM
DMK DMK is offline
Registered User
 
Join Date: Apr 2005
Location: Cochin, Kerala, India.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi ,
  Can u print the content of 'sql' using reponse.write(sql).

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get html code for the selected part of the suryasimha ASP.NET 1.x and 2.0 Application Design 3 July 19th, 2007 12:00 PM
Open Form, run query, open form Grafixx01 Access 7 April 26th, 2007 11:32 AM
Copy data from Excel to open HTML form Bartje Excel VBA 1 September 29th, 2006 04:02 AM
Open a table selected in a html form SKE Classic ASP Databases 0 May 17th, 2005 08:59 AM
open file with highlet selected text salman Classic ASP Databases 0 February 23rd, 2004 10:54 PM



All times are GMT -4. The time now is 07:13 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.