|
 |
asp_database_setup thread: Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
Message #1 by Casey Yandle <cyandle@c...> on Mon, 13 Aug 2001 08:54:50 -0400
|
|
When I try to search my database it gives me the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected
1.
/viewmembers.asp, line 56.
Code:
<%
'Dim local variables
Dim sqlString, txtCategory, ColorSwitch, RowColor
'Build sqlString
txtCategory = Request.Form("txtcategory")
sqlString = "SELECT Company, Address, City, State, Phone, Email,
Website FROM members WHERE txtCategory = '" & txtcategory & "' AND
MemberTypeID IN ('Primary','Associate','Non-Dues')"
'Create recordset
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sqlString, "DSN=rvcc"
%>
I've looked at http://www.adopenstatic.com/faq/80040e10.asp but I still
cannot figure out what I have done wrong. To me I have done everything
right but I guess I haven't. It's probably something right in front of
my face. Any help will be graciously appreciated. Thanks.
Casey Yandle
Message #2 by "Ken Schaefer" <ken@a...> on Tue, 14 Aug 2001 13:42:20 +1000
|
|
Casey,
My page (which you say you read) has a section on mis-spelt column names.
You don't have a column in your database called txtCategory, hence you are
getting the error.
http://w3.one.net/~jhoffman/sqltut.htm
is a good introduction to writing SQL queries. Your where clauses need to be
in the format:
WHERE
column_name = 'somecriteria'
AND
some_other_column_Name = 'some_other_criteria'
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
----- Original Message -----
From: "Casey Yandle" <cyandle@c...>
To: "ASP Database Setup" <asp_database_setup@p...>
Sent: Monday, August 13, 2001 11:14 PM
Subject: [asp_database_setup] Microsoft OLE DB Provider for ODBC Drivers
error '80040e10'
: When I try to search my database it gives me the following error:
:
: Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected
: 1.
: /viewmembers.asp, line 56.
:
: Code:
:
: <%
: 'Dim local variables
: Dim sqlString, txtCategory, ColorSwitch, RowColor
:
: 'Build sqlString
: txtCategory = Request.Form("txtcategory")
: sqlString = "SELECT Company, Address, City, State, Phone, Email,
: Website FROM members WHERE txtCategory = '" & txtcategory & "' AND
: MemberTypeID IN ('Primary','Associate','Non-Dues')"
:
: 'Create recordset
: set rs = Server.CreateObject("ADODB.Recordset")
: rs.Open sqlString, "DSN=rvcc"
:
: %>
:
: I've looked at http://www.adopenstatic.com/faq/80040e10.asp but I still
: cannot figure out what I have done wrong. To me I have done everything
: right but I guess I haven't. It's probably something right in front of
: my face. Any help will be graciously appreciated. Thanks.
:
:
: Casey Yandle
:
:
: ---
: Search the best ASP Web sites using CodeHound! http://www.codehound.com
: Now it's easy to find ASP source code on the Internet. CodeHound's free
: search engine will categorize your results and even search for ASP code
: compressed in Zip files on the Internet. Stop searching dozens of
: different sites to find what you want...try CodeHound right now!
ken@a...
$subst('Email.Unsub')
|
|
 |