Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - What’s wrong with sql
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

What’s wrong with sql

 Post Reply Post Reply
Author
choshour View Drop Down
Newbie
Newbie
Avatar

Joined: 24 February 2003
Location: United States
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote choshour Quote  Post ReplyReply Direct Link To This Post Topic: What’s wrong with sql
    Posted: 28 June 2003 at 10:14am

  rs.Open "SELECT * FROM ratings WHERE Ip='" & visitorIP & "' AND TeamName=" & TeamName

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

[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'Ip='66.77.7777' AND TeamName=St George'.

The IP is correct I just changed it here
The error points to the sql statement

What is the missing operator in the statement?

If I choose any other choice out of the drop down menu to add to the database I get this.

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

The field and table names are correct.

This points to the sql statement also



Edited by choshour
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: 28 June 2003 at 11:05am
The variable teamname should be surrounded by ''
TeamName='" & TeamName &"'"
Back to Top
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post Posted: 28 June 2003 at 4:09pm

you forgot the other apostrophe

rs.Open "SELECT * FROM ratings WHERE Ip='" & visitorIP & "' AND TeamName="' & TeamName

Back to Top
choshour View Drop Down
Newbie
Newbie
Avatar

Joined: 24 February 2003
Location: United States
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote choshour Quote  Post ReplyReply Direct Link To This Post Posted: 29 June 2003 at 12:56pm
Thanks that worked.  A am having other problems but I get to those later.
Back to Top
 Post Reply Post Reply

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.