Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old September 22nd, 2005, 01:26 PM
tb582 tb582 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2005
Posts: 70 tb582 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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....

Reply With Quote
  #2  
Old September 25th, 2005, 09:05 PM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 23 h 29 m 58 sec
Reputation Power: 181
Nearly always this error is because you have a column or table name in your sql string that isn't in the database itself, either you used the wrong name or made a typo.
__________________
======
Doug G
======
I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > Error Help


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT