Print Page | Close Window

sql error

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Database Discussion
Forum Description: Discussion and chat on database related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=16927
Printed Date: 29 March 2026 at 3:12am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: sql error
Posted By: pilot99
Subject: sql error
Date Posted: 16 October 2005 at 7:55pm
i get this error when trying to view a page any help?
 

Microsoft OLE DB Provider for ODBC Drivers error '80040e10'

[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.

/testing/database/show.asp, line 24

from this line
rsGuestbook.Open strSQL, adoCon


-------------
http://www.globaltornado.com">



Replies:
Posted By: ljamal
Date Posted: 16 October 2005 at 9:28pm
check your sql string, usually this means you misspelled one of the column or table names

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming


Posted By: pilot99
Date Posted: 17 October 2005 at 6:21pm
then what is wrong with this string?
strSQL = "SELECT tblComments.Name, tblComments.Comments, tblComments.nickname FROM tblComments WHERE tblComments.view LIKE '1';"


-------------
http://www.globaltornado.com">


Posted By: ljamal
Date Posted: 17 October 2005 at 7:54pm
if you open up an Access query and paste in the query it will tell you where the problem is

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming


Posted By: davidshq
Date Posted: 17 October 2005 at 11:10pm
Why aren't you doing a direct equivalency? "WHERE tblComment.View=1" The semi-colon isn't required at the end of the statement (not sure that it should cause any problems). Why is your 1 in '' marks.
David.


-------------
- http://www.davemackey.net/" rel="nofollow - Dave Mackey - Virtual Home.


Posted By: dpyers
Date Posted: 18 October 2005 at 6:24pm
Originally posted by pilot99 pilot99 wrote:

then what is wrong with this string?
strSQL = "SELECT tblComments.Name, tblComments.Comments,
tblComments.nickname FROM tblComments WHERE tblComments.view LIKE
'1';"


Don't have the guestbook code, but I'd bet that tblComments.nickname needs to be tblComments.Nickname

-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: pilot99
Date Posted: 18 October 2005 at 7:59pm
i dont belive that is the problem cause the nicknames was working finr before thats not the problem.

-------------
http://www.globaltornado.com">


Posted By: ljamal
Date Posted: 18 October 2005 at 8:57pm
insert

Response.write strSQL
Response.End


before line 24 and report back what you see

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming


Posted By: pilot99
Date Posted: 19 October 2005 at 6:26pm
yes it writes this on my web page
 
SELECT tblComments.Name, tblComments.Comments, tblComments.nickname FROM tblComments WHERE tblComments.View = 1;
 
which is the sql statement.


-------------
http://www.globaltornado.com">


Posted By: ljamal
Date Posted: 22 October 2005 at 1:10am
cherkc you database to be sure all the colum names are spelled correctly

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net