ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingASP Development

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 January 2nd, 2008, 07:48 PM
phuc2583 phuc2583 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2007
Posts: 66 phuc2583 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 h 47 m 46 sec
Reputation Power: 2
General - Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)

i have some problem with my code about "edit" database that writes access.but bot run and error:

Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1


Listcategory.asp:
<!--#include file="../include/connection.inc"-->
<%
set rs=conn.execute("Select * from categories")
while not rs.eof
%>
<tr>
<th scope="row">&nbsp;</th>
<th scope="row"><%=rs("categoryname")%></th>
<th scope="row">
<a href="FormUpdateCategories.asp?Categoryid=<%=rs("CategoryID")%>">Edit</a>
</th>
</tr>
<%
rs.movenext
wend
rs.close
set rs=nothing
conn.close
set conn=nothing
response.End()
%>
and then formupdatecaegories.asp
<!--#include file="../include/connection.inc"-->
<%
dim id
ID = trim(request.querystring("CategoryID"))
Set rs=Conn.execute("SELECT * FROM categories WHERE CategoryID = "& ID)
%>

and it error line:Set rs=Conn.execute("SELECT * FROM categories WHERE CategoryID = "& ID)
please help me to do that
Thanks in advance
Regrads
Hoang Phuc

Reply With Quote
  #2  
Old January 3rd, 2008, 02:05 AM
micky's Avatar
micky micky is offline
Couch Potato Wizard
Click here for more information. Click here for more information
 
Join Date: Jan 2005
Location: India
Posts: 11,804 micky User rank is General 16th Grade (Above 100000 Reputation Level)micky User rank is General 16th Grade (Above 100000 Reputation Level)micky User rank is General 16th Grade (Above 100000 Reputation Level)micky User rank is General 16th Grade (Above 100000 Reputation Level)micky User rank is General 16th Grade (Above 100000 Reputation Level)micky User rank is General 16th Grade (Above 100000 Reputation Level)micky User rank is General 16th Grade (Above 100000 Reputation Level)micky User rank is General 16th Grade (Above 100000 Reputation Level)micky User rank is General 16th Grade (Above 100000 Reputation Level)micky User rank is General 16th Grade (Above 100000 Reputation Level)micky User rank is General 16th Grade (Above 100000 Reputation Level)micky User rank is General 16th Grade (Above 100000 Reputation Level)micky User rank is General 16th Grade (Above 100000 Reputation Level)micky User rank is General 16th Grade (Above 100000 Reputation Level)micky User rank is General 16th Grade (Above 100000 Reputation Level)micky User rank is General 16th Grade (Above 100000 Reputation Level)  Folding Points: 1480 Folding Title: Novice Folder
Time spent in forums: 4 Months 3 Weeks 2 Days 15 h 8 m 47 sec
Reputation Power: 2058
please use code tags, select code and press #.
It seems you dont have a value in ID.
Also, dont store connection details in an inc file as it might not be safe, store it in an asp file.
__________________
Laziness is my religion and Sunday is my God

Get the Mantra!

Reply With Quote
  #3  
Old January 3rd, 2008, 02:08 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 47th Plane (28000 - 28499 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 28,432 Shadow Wizard User rank is General 18th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 18th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 18th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 18th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 18th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 18th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 18th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 18th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 18th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 18th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 18th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 18th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 18th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 18th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 18th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 18th Grade (Above 100000 Reputation Level)  Folding Points: 478881 Folding Title: Super Ultimate Folder - Level 1Folding Points: 478881 Folding Title: Super Ultimate Folder - Level 1Folding Points: 478881 Folding Title: Super Ultimate Folder - Level 1Folding Points: 478881 Folding Title: Super Ultimate Folder - Level 1Folding Points: 478881 Folding Title: Super Ultimate Folder - Level 1Folding Points: 478881 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 2 Weeks 1 Day 1 h 1 m 6 sec
Reputation Power: 2190
--moved to the ASP forum.

Reply With Quote
  #4  
Old January 3rd, 2008, 02:31 AM
barneybabe's Avatar
barneybabe barneybabe is offline
Contributing User
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Jun 2004
Posts: 1,582 barneybabe User rank is First Lieutenant (10000 - 20000 Reputation Level)barneybabe User rank is First Lieutenant (10000 - 20000 Reputation Level)barneybabe User rank is First Lieutenant (10000 - 20000 Reputation Level)barneybabe User rank is First Lieutenant (10000 - 20000 Reputation Level)barneybabe User rank is First Lieutenant (10000 - 20000 Reputation Level)barneybabe User rank is First Lieutenant (10000 - 20000 Reputation Level)barneybabe User rank is First Lieutenant (10000 - 20000 Reputation Level)barneybabe User rank is First Lieutenant (10000 - 20000 Reputation Level)  Folding Points: 8920 Folding Title: Novice Folder
Time spent in forums: 2 Weeks 2 Days 10 h 48 m 52 sec
Reputation Power: 171
This error occurs in Microsoft Access when one of the column names specified in a select statement does not exist in the table being queried.

1. Check the table whether CategoryID column exists or not.
2. Check whether you have mis-spelled the column name

Reply With Quote
  #5  
Old January 3rd, 2008, 02:52 AM
ngaisteve1's Avatar
ngaisteve1 ngaisteve1 is offline
ASP Free Member
ASP Free Novice (500 - 999 posts)
 
Join Date: Jan 2004
Location: Kuala Lumpur, Malaysia (Boleh!)
Posts: 749 ngaisteve1 User rank is Brigadier General (60000 - 70000 Reputation Level)ngaisteve1 User rank is Brigadier General (60000 - 70000 Reputation Level)ngaisteve1 User rank is Brigadier General (60000 - 70000 Reputation Level)ngaisteve1 User rank is Brigadier General (60000 - 70000 Reputation Level)ngaisteve1 User rank is Brigadier General (60000 - 70000 Reputation Level)ngaisteve1 User rank is Brigadier General (60000 - 70000 Reputation Level)ngaisteve1 User rank is Brigadier General (60000 - 70000 Reputation Level)ngaisteve1 User rank is Brigadier General (60000 - 70000 Reputation Level)ngaisteve1 User rank is Brigadier General (60000 - 70000 Reputation Level)ngaisteve1 User rank is Brigadier General (60000 - 70000 Reputation Level)ngaisteve1 User rank is Brigadier General (60000 - 70000 Reputation Level)ngaisteve1 User rank is Brigadier General (60000 - 70000 Reputation Level)ngaisteve1 User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 9 h 27 m 7 sec
Reputation Power: 684
Debug it by using response.write and response.end.

sql = "SELECT * FROM categories WHERE CategoryID = "& ID

response.write sql
response.end

Set rs=Conn.execute(sql)
__________________
My homepage - www.findingsteve.net

Greatest commandment - “Teacher, which is the greatest commandment in the Law?” Jesus replied: “ ‘Love the Lord your God with all your heart and with all your soul and with all your mind.’ This is the first and greatest commandment. And the second is like it: ‘Love your neighbor as yourself.’ ” Matthew 22: 36-40 (NIV, Bible)

Progress - "Sedikit-sedikit, lama-lama menjadi bukit." (Literal translation: Bit by bit, in the end it becomes a hill.)

Reply With Quote
  #6  
Old January 3rd, 2008, 05:26 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 47th Plane (28000 - 28499 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 28,432 Shadow Wizard User rank is General 18th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 18th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 18th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 18th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 18th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 18th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 18th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 18th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 18th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 18th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 18th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 18th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 18th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 18th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 18th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 18th Grade (Above 100000 Reputation Level)  Folding Points: 478881 Folding Title: Super Ultimate Folder - Level 1Folding Points: 478881 Folding Title: Super Ultimate Folder - Level 1Folding Points: 478881 Folding Title: Super Ultimate Folder - Level 1Folding Points: 478881 Folding Title: Super Ultimate Folder - Level 1Folding Points: 478881 Folding Title: Super Ultimate Folder - Level 1Folding Points: 478881 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 2 Weeks 1 Day 1 h 1 m 6 sec
Reputation Power: 2190
another common reason for this error is if CategoryID is varchar, then
you get:
SELECT * FROM categories WHERE CategoryID = A5NM1SP
and of course, you don't have field named "A5NM1SP".
if that's the case, wrap the value with single quotes.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingASP Development > General - Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)


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



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

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





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