Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - sql error
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

sql error

 Post Reply Post Reply Page  12>
Author
pilot99 View Drop Down
Groupie
Groupie


Joined: 05 July 2004
Status: Offline
Points: 167
Post Options Post Options   Thanks (0) Thanks(0)   Quote pilot99 Quote  Post ReplyReply Direct Link To This Post Topic: sql error
    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
Back to Top
ljamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Status: Offline
Points: 888
Post Options Post Options   Thanks (0) Thanks(0)   Quote ljamal Quote  Post ReplyReply Direct Link To This Post Posted: 16 October 2005 at 9:28pm
check your sql string, usually this means you misspelled one of the column or table names
Back to Top
pilot99 View Drop Down
Groupie
Groupie


Joined: 05 July 2004
Status: Offline
Points: 167
Post Options Post Options   Thanks (0) Thanks(0)   Quote pilot99 Quote  Post ReplyReply Direct Link To This Post 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';"
Back to Top
ljamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Status: Offline
Points: 888
Post Options Post Options   Thanks (0) Thanks(0)   Quote ljamal Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
davidshq View Drop Down
Senior Member
Senior Member


Joined: 29 July 2003
Location: United States
Status: Offline
Points: 299
Post Options Post Options   Thanks (0) Thanks(0)   Quote davidshq Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
pilot99 View Drop Down
Groupie
Groupie


Joined: 05 July 2004
Status: Offline
Points: 167
Post Options Post Options   Thanks (0) Thanks(0)   Quote pilot99 Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
ljamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Status: Offline
Points: 888
Post Options Post Options   Thanks (0) Thanks(0)   Quote ljamal Quote  Post ReplyReply Direct Link To This Post Posted: 18 October 2005 at 8:57pm
insert

Response.write strSQL
Response.End


before line 24 and report back what you see
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.