Hello...

I'm having trouble running a database query. The exact error I am getting is as follows:

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>
Error # = 80040E10
Description = [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
Source = Microsoft OLE DB Provider for ODBC Drivers
SQL State = 07001
NativeError = -3010
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>

The code for the two asp files I am using is listed below.

Would anyone be able to explain why I am getting this error? It used to work fine until I changed something. I know that my ODBC connection is alright because I am able to page though the database properly thanks to MARK who responded to my previous post.

I would appreciate any help on this...

Thank you

=== FILE 1: RB-SEARCH.ASP ============================================

<% response.buffer=true %>
<!--ASP-db-->

<HTML>

<HEAD>
<title>rb-search.asp</title>
</HEAD>

<Body BGCOLOR=BLACK TEXT=White LINK=Black ALINK=Red VLINK=Black>

<CENTER><B>RADIO BUTTON SEARCH<P></B>

<HR WIDTH=66%>

<FORM NAME=THEFORM ACTION=&#34;rb-search-results.asp&#34; METHOD=POST>

Please select the PictureCategory (piccat) that you want to see... <P>

<%
&#39; <INPUT TYPE=RADIO NAME=&#34;CHOICE&#34; VALUE=&#34;so&#34; CHECKED> SO<BR>
%>

<INPUT TYPE=RADIO NAME=&#34;CHOICE&#34; VALUE=&#34;so&#34;> SO<BR>
<INPUT TYPE=RADIO NAME=&#34;CHOICE&#34; VALUE=&#34;to&#34;> TO<BR>
<INPUT TYPE=RADIO NAME=&#34;CHOICE&#34; VALUE=&#34;hh&#34;> HH<BR>
<INPUT TYPE=RADIO NAME=&#34;CHOICE&#34; VALUE=&#34;ts&#34;> TSBR>
<INPUT TYPE=RADIO NAME=&#34;CHOICE&#34; VALUE=&#34;bb&#34;> BB<BR><P>
<INPUT TYPE=SUBMIT NAME=&#34;SUBMIT&#34; Value=&#34;SEARCH&#34;> <BR>
</FORM>

</BODY>
</HTML>

=== FILE 2: RB-SEARCH-RESULTS.ASP =================================

<HEAD>
<title>rb-search-results.asp</title>
</HEAD>

<Body BGCOLOR=BLACK TEXT=Red LINK=Black ALINK=Red VLINK=Black>

<CENTER><B>RADIO BUTTON SEARCH RESULTS<P></B>

<HR WIDTH=66%>

<%
Set MyDb = Server.CreateObject(&#34;AspDB.Pro&#34

MyDb.dbDSN = &#34;myimagedb&#34;
MyDb.dbUnit = 1044
MyDb.DBColor = &#34;4,auto,,,true&#34; &#39;DEFINES COLOR SCHEME TO BE USED
MyDb.dbImageDir=&#34;images/&#34; &#39;DEFINES NAVIGATION BUTTONS DIRECTORY
MyDb.dbGridTableTag = &#34;border=0 cellspacing=5 cellpadding=5&#34;
&#39;DEFINE TAGS THAT GO INTO <TABLE...>
MyDb.DbMode = &#34;grid&#34; &#39;DEFINES OVERALL DISPLAY MODE
Mydb.dbGridCol = &#34;3&#34; &#39;DEFINES INITIAL NUMBER OF COLUMNS
MyDb.DbGridInc = &#34;9&#34; &#39;SETS GRID DISPLAY ROW INCREMENT (PAGE SIZE)

SELECTION=Request(&#34;CHOICE&#34 &#39; Get what the user selects in the rb-search.asp program
response.write(&#34;PictureCategory (CHOICE) selected is: &#34; & SELECTION & &#34;<BR>&#34 &#39; will be &#34;so&#34;, &#34;to&#34;, &#34;hh&#34;, &#34;ts&#34; or &#34;bb&#34;

X = Session(&#34;CHOSEN&#34

if SELECTION = &#34;so&#34; then
Mydb.dbReset(1047)
MyDb.dbSQL=&#34;Select * FROM [pictures] WHERE piccat = &#39;so&#39;&#34;
Session(&#34;CHOSEN&#34 = SELECTION
end if

if SELECTION = &#34;to&#34; then
Mydb.dbReset(1047)
MyDb.dbSQL=&#34;Select * FROM [pictures] WHERE piccat = &#39;to&#39;&#34;
Session(&#34;CHOSEN&#34 = SELECTION
end if

if SELECTION = &#34;hh&#34; then
Mydb.dbReset(1047)
MyDb.dbSQL=&#34;Select * FROM [pictures] WHERE piccat = &#39;hh&#39;&#34;
Session(&#34;CHOSEN&#34 = SELECTION
response.write(&#34;inside 3rd if&#34
end if

if SELECTION = &#34;ts&#34; then
Mydb.dbReset(1047)
MyDb.dbSQL=&#34;Select * FROM [pictures] WHERE piccat = &#39;ts&#39;&#34;
Session(&#34;CHOSEN&#34 = SELECTION
end if

if SELECTION = &#34;bb&#34; then
Mydb.dbReset(1047)
MyDb.dbSQL=&#34;Select * FROM [pictures] WHERE piccat = &#39;bb&#39;&#34;
Session(&#34;CHOSEN&#34 = SELECTION
end if

&#39;FORMATS thpicpath FIELD TO DISPLAY THE JPG THUMBNAIL
mc = &#34;picpath,align=center BGCOLOR=black,<A HREF=&#34;&#34;#picpath#&#34;&#34;><IMG BORDER=0 &#34; &#39;WIDTH=100 HEIGHT=80
mc = mc + &#34;VSPACE=0 HSPACE=0 SRC=&#34;&#34;#thpicpath#&#34;&#34; ALT=&#34;&#34;Click me to see a larger photo&#34;&#34;></A>;&#34;
MyDb.dbMagicCell = mc

MyDb.dbReset(1234) &#39;Make sure you are not using any old information - ie. clear session variable
MyDb.dbGridHideFlds = &#34;picid,pset,picsize,thpicpath,piccat&#34;
&#39;HIDES FIELDS IN DB YOU DON&#39;T WANT TO DISPLAY
MyDb.dbHeader = &#34;false&#34; &#39;HIDES HEADER FIELDS
MyDb.dbNavigation=&#34;both&#34; &#39;PLACES NAVIGATION BUTTONS ON PAGE
MyDb.dbNavigationItem=&#34;top, bottom, next, prev&#34;
&#39;DEFINES WHICH NAVIGATIONS BUTTONS TO DISPLAY
MyDb.dbNavigationIcon=&#34;std&#34; &#39;USE THE STANDARD NAVIGATION BUTTONS
MyDb.aspDBPro
%>

<P>
<CENTER>
<A HREF=&#34;rb-search.asp&#34;>Return to the radio button search screen</A>
</CENTER>

</BODY>
</HTML>