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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access/SQL query error PLEASE HELP!!!!! 1

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi:

I have a web app that was originally intended for a SQL database. For reasons I cant get into we had to use a Access database. As a result the SQL statements are incorrect, and we get the following error:

"Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access 97 Driver] Too few parameters. Expected 1.

/mss/includes/displays/dsp_sidebar.cyb, line 12"

Here is the refrenced code:

<%
' loop thru months to create second-level nodes
for j = 0 to UBound(Months)
rs.open &quot;SELECT count(id) FROM Responses WHERE DatePart(mm,datecompleted) = &quot; & (j + 1), cn
ctRow = rs(0)
k = 0

' determine the currently selected month
blnActive = j = C8Int(dt) and dt <> &quot;&quot;

' determine appropriate image for this node
NodePlusImage = iff(j < 11,&quot;splus&quot;,&quot;b_splus&quot;)
NodeNoImage = iff(j < 11,&quot;sub&quot;,&quot;b_sub&quot;)
Level2NodeImage = iff(rs(0)>0, NodePlusImage, NodeNoImage)%>

If anyone can help I would greatly appreciate it!!!!!!!

-E

 
Terry:

I really appreciate the help. I added changed the code and got the following error:

Microsoft VBScript compilation error '800a0401'

Expected end of statement

/mss/includes/displays/dsp_sidebar.cyb, line 12

rs.open &quot;SELECT count(id) FROM Responses WHERE DatePart(&quot;m&quot;,datecompleted) = &quot; & (j + 1), cn
---------------------------------------------------------^

Any help is GREATLY appreciated!!!!!!!

-E
 
Terry:

I was able to fix this by putting single quotes ('m'
Thank you for your response!! You really helped me out!

-e
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top