Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 SQL error

Author  Topic 

JohnnyBarker
Starting Member

1 Post

Posted - 2002-03-26 : 12:15:07
When I call the following code (see below) I get the following error
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
Temp.asp, line 8


where page 8 is rs.open Sqlstr, conn

Thanks in advance
John Barker


ConnString ="DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("db/data.mdb")
set conn= Server.CreateObject("ADODB.Connection")
Conn.Open ConnString
set rs = Server.CreateObject("ADODB.Recordset")
sqlstr = "SELECT Members.MemberID, Members.Name, Enteries.EntryID, Enteries.Body, Enteries.Date, Enteries.Time, Enteries.Subject, Enteries.Music, Enteries.Mood, Members.JournalName FROM Members INNER JOIN Enteries ON Members.MemberID = Enteries.MemberID WHERE (((Members.Name)=" & request.querystring("membername") & ") AND ((Enteries.MemberID)=[Members]![MemberID])) ORDER BY Enteries.Date DESC , Enteries.Time DESC"

rs.open Sqlstr, conn



Edited by - johnnybarker on 03/26/2002 12:17:38

setbasedisthetruepath
Used SQL Salesman

992 Posts

Posted - 2002-03-26 : 13:52:04
You should try putting the query into a stored procedure rather than running embedded SQL through an ASP page. It's a better design and it facilitates debugging as well.

setBasedIsTheTruepath
<O>
Go to Top of Page

Jay99

468 Posts

Posted - 2002-03-26 : 13:57:33
quote:

...into a stored procedure...

setBasedIsTheTruepath
<O>



How do you write procs in Access?

I suggest moving (site admin action, not a JohnnyBarker action) this to the Access Forum . . .

Jay
<O>
Go to Top of Page

setbasedisthetruepath
Used SQL Salesman

992 Posts

Posted - 2002-03-26 : 13:59:40
my apologies, you are entirely correct ...

i was misled by the poster; surely he knows this is a SQL Server forum.

setBasedIsTheTruepath
<O>
Go to Top of Page
   

- Advertisement -