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



Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old April 6th, 2010, 01:12 PM
Shai1579 Shai1579 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2010
Posts: 1 Shai1579 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 30 m 20 sec
Reputation Power: 0
Unhappy Syntax error (missing operator) in query expression

Probably Im missing something small and stupid but I get Syntax error (missing operator) in query expression error everytime I run this code. Ohh and the EOF part is obviously running fine.


<%
Temp = Request.form("Name")


Set Conn = Server.CreateObject("ADODB.Connection")
Set RS = Server.CreateObject("ADODB.RecordSet")
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("users.mdb")


Set rsInfo = Conn.Execute("SELECT * FROM userlist WHERE username = '" & Temp & "'")

If rsInfo.EOF Then

Response.Write "<CENTER>Write something...<br>"

Else
SQL = "UPDATE userlist"
SQL = SQL+" SET fullname = '" & Request.Form("FName") & "'"
SQL = SQL+" SET gender= '" & Request.Form("RegGender") & "'"
SQL = SQL+" SET dobm= '" & Request.Form("RegDOBM") & "'"
SQL = SQL+" SET dobd= '" & Request.Form("RegDOBD") & "'"
SQL = SQL+" SET doby= '" & Request.Form("RegDOBY") & "'"
Set rsInfo = Conn.Execute(SQL)

RS.Close
Conn.Close

Response.Write "<CENTER><font color=white>Record Updated!</font><br></CENTER>"
Response.Write "<a href=HomeC.html>Back</a>"
End If
%>



Simple update code that somewhy have a problem in the execute line...
Hope you can help thanks a lot in advance. (btw all the names and access tables names are ok I checked 3 times or so.)

Reply With Quote
  #2  
Old June 6th, 2011, 11:33 AM
SoftwareMatters SoftwareMatters is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2009
Posts: 18 SoftwareMatters User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 5 m 29 sec
Reputation Power: 0
What line are you getting the error on?

You could try hard coding the Temp variable to make sure it works e.g.

Set rsInfo = Conn.Execute("SELECT * FROM userlist WHERE username = 'Kevin'")

Reply With Quote
  #3  
Old June 20th, 2011, 08:41 PM
eric miller eric miller is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2010
Posts: 5 eric miller User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 19 h 46 m 42 sec
Reputation Power: 0
What is the error message you are getting?

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > Syntax error (missing operator) in query expression


Developer Shed Advertisers and Affiliates


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

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


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap