
September 22nd, 2005, 01:26 PM
|
|
Contributing User
|
|
Join Date: Sep 2005
Posts: 70
Time spent in forums: 19 h 59 m 52 sec
Reputation Power: 4
|
|
|
Error Help
There is a list of check boxes on my site where you select the option you want then click go only when you click go on a certian one I get this...??? all of the others work.
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
/srch_weave_result.asp, line 63
Here is where I believe the problem to be, I have made comments on the code but I don't see anything wrong?....
Code:
<%
// Use the index to store the position of each rug and to figure out which rug to display. If there
// is no index from the query string, assume we are at the first rug.
if (Request("index") == "" || Request("index").Count == 0) {
var index = 0;
} else {
var index = parseInt(Request("index"));
}
// Use to find out which page we are currently at. If there is no page from the query string, assume we are at
// the first page
if (Request("page") == "" || Request("page").Count == 0) {
var currentPage = 1;
} else {
var currentPage = parseInt(Request("page"));
}
// "weave" is the name of the form checkbox passed from the srch_weave.asp page
// "whereclause" will be used in the SELECT SQL statement
var whereClause ="";
var count = Request("weave").Count;
// Stores the weaves for the query string so that it can be passed on to the details page
var weave="";
// Start constructing the query and where clause for the sql statment.
if (count == 0) {
var query = "SELECT Name, smRoomImage, swatchImage, smFlatImage FROM tblMainRugs ORDER BY Name";
} else {
for(var i=1;i<=count;i++){
weave += Request("weave").Item(i);
whereClause += Request("weave").Item(i) + " LIKE 'Program%'";
if (i < count) {
whereClause += " OR ";
weave += "&weave=";
}
}
var query = "SELECT Name, smRoomImage, swatchImage, smFlatImage FROM tblMainRugs WHERE " + whereClause + " ORDER BY Name ASC";
}
// Create the recordset and connection objects and execute the query
var rsGroup1 = Server.CreateObject("ADODB.Recordset");
var dbConn = Server.CreateObject("ADODB.Connection");
dbConn.Open(MM_asmara99_STRING);
rsGroup1.CursorType = 1;
rsGroup1.LockType = 1;
rsGroup1 = dbConn.Execute(query);
%>
I also printed the query by using response.write before the recordset ran, and they all showed up 0 even the ones that worked....
|