Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Too few parameters

Status
Not open for further replies.

discusmania

IS-IT--Management
Oct 24, 2000
158
AP
Hi guys,

I run this code:

local_name=request("local_name")
if local_name<>"" then
strdetail="SELECT id,local_name,latin_name,other_name,location,desc,origin,usage,sender,picture from "&_
"plant_listing where local_name='"&local_name&"'"
response.Write strdetail
set rsdetail=cn.Execute(strdetail)
if not rsdetail.eof then
aedit=rsdetail.getrows()
edit_count=ubound(aedit,2)
end if
end if

AND get this error:

SELECT id,local_name,latin_name,other_name,location,desc,origin,usage,sender,picture from plant_listing where local_name='Bunga Kenanga'

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

[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 5.

/dept/amt/software/fms/myown/update2.asp, line 10

what could be wrong??

thanks and regards,
Ron
 
Hi,

Just a suggestion because I have come across a similar thing when using recordsets, but the code:

Code:
set rsdetail=cn.Execute(strdetail)

May need to be become

Code:
set rsdetail=cn.Execute strdetail

Sometimes Access is really funny about brackets being used/ not being used.

Thanks

Andrew
 
Hi

The 'too few paramters' error is usually an indication of a syntax error or a miss-spelled column name in the SQL, I cannot immediately see anything wrong with your syntax but have no way of checking column names, why not try using debug to print a copy of the sql string in the immediate window, then copy/paste it into the query designer and run it there, you sometimes get more helpful diagnostic messages

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top