Scripting: ASP problemstarted by Dave on Jul 23, 2004 — RSS Feed
I have set up a simple database and want to query it using hyperlinks. The code has been written in asp. When i click on a hyperlink, i want a page to appear with corresponding records in the database.
The hyperlinks look like this:
<a href="connect.asp?qsname=customer">Click here to view customer related attributes</a><br>
<a href="connect.asp?qsname=product">Click here to view product related attributes</a> <br>
<a href="connect.asp?qsname=service">Click here to view service related attributes</a>
The asp page conatins the following code:
<B>Here are the realted attributes:</B><BR><br>
Set MyConn = Server.CreateObject("ADODB.Connection"
SQL_query = "SELECT * FROM Friends where Name=qsname"
Set RS = MyConn.Execute(SQL_query)
WHILE NOT RS.EOF
When i click on a hyperlink i get the follwing error message:
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
/webpub/connect.asp, line 8
The database is very simple. It has a table called 'Friends' and this contains 2 fields - 'Name' and 'Link'.
Any help would be greatly appreciated
Thanks in advance
Dave, this code is referring to a DSN; has the DSN been configured on your webserver?
Thanks for the reply - ive somehow managed to get the code working now
You must login to reply