SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseSQL 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 November 17th, 2003, 09:32 PM
mattboy_slim mattboy_slim is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 76 mattboy_slim User rank is Corporal (100 - 500 Reputation Level)mattboy_slim User rank is Corporal (100 - 500 Reputation Level)mattboy_slim User rank is Corporal (100 - 500 Reputation Level)mattboy_slim User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 16 h 35 m 16 sec
Reputation Power: 8
Syntax error (missing operator) in query expression

I purchased a piece of realty software, and am having trouble adding custom fields.

I'm trying to add the new field I created in the DB to the SQL query.

When I attempt to submit the form, I get the following error message:

Quote:
Error Type:
Microsoft JET Database Engine (0x80040E14)
Syntax error (missing operator) in query expression '1',LIST_LAKE = ''.
/carlson/sm_includes/functions.asp, line 97


I've posted what I believe to be the relevant code below, with my added items highlighted in red. Please help me out, as I'm feeling quite stupid here and could really use a little boost in my evening.

Thanks,
Matt

Code:
'*************************************************  *************
'Check posted values and update database with new values
'*************************************************  *************
	IF Request.QueryString("upd") = "go" THEN
	
		list_id = Request.Form("list_id") * 1
		list_address = Request.Form("list_address")
		list_location = Request.Form("list_location") * 1
		list_desc = Request.Form("list_desc")
		list_features = Request.Form("list_features")
		list_add_info = Request.Form("list_add_info")
		list_price = Request.Form("list_price")
		list_pricing = Request.Form("list_pricing") * 1
		list_status = Request.Form("list_status") * 1
		list_order = Request.Form("list_order") * 1
		list_featured = Request.Form("list_featured") * 1
		list_viewable = Request.Form("list_viewable")
		list_lake = Request.Form("list_lake")
				
		CALL sql_safe(list_address)
		CALL sql_safe(list_desc)
		CALL sql_safe(list_features)
		CALL sql_safe(list_add_info)
		CALL fix_number(list_price)
	
		errortext = "<p><span class='rednotice'>Errors have occured</span><br>Please correct the errors listed below:</p>"
		' errortext = CheckNotBlank(errortext,errorno,"Address",list_address)
		errortext = CheckNotBlank(errortext,errorno,"Description",list_desc)
		errortext = CheckNumber(errortext,errorno,"Price",list_price)
		
		IF errorno = 0 THEN
				
			sql_table = "TBL_LISTINGS"
			sql_set = "LIST_DATE = #" & Date() & "#,LIST_LOCATION = " & list_location & ",LIST_ADDRESS = '" & list_address & "',LIST_DESC = '" & list_desc & "',LIST_FEATURES = '" & list_features & "',LIST_ADD_INFO = '" & list_add_info & "',LIST_PRICE = " & list_price & ",LIST_PRICING = " & list_pricing & ",LIST_STATUS = " & list_status & ",LIST_ORDER = " & list_order & ",LIST_VIEWABLE = '" & list_viewable & "',LIST_FEATURED = " & list_featured & "',LIST_LAKE = '" & list_lake
			sql_where = "LIST_ID = " & list_id
			
			CALL UpdateRecord(updListing,sql_table,sql_set,sql_wher  e)
						
			Response.Redirect("listings.asp?l=" & Request.QueryString("l"))
			
		END IF
		
	END IF

Reply With Quote
  #2  
Old November 18th, 2003, 11:40 AM
Memnoch's Avatar
Memnoch Memnoch is offline
Unholy Moderator
ASP Free God 14th Plane (11500 - 11999 posts)
 
Join Date: Oct 2003
Location: In hell, where did you think?
Posts: 11,760 Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 5 h 22 m 16 sec
Reputation Power: 443
Code:
sql_set = "LIST_DATE = #" & Date() & "#,LIST_LOCATION = " & list_location & ",LIST_ADDRESS = '" & list_address & "',LIST_DESC = '" & list_desc & "',LIST_FEATURES = '" & list_features & "',LIST_ADD_INFO = '" & list_add_info & "',LIST_PRICE = " & list_price & ",LIST_PRICING = " & list_pricing & ",LIST_STATUS = " & list_status & ",LIST_ORDER = " & list_order & ",LIST_VIEWABLE = '" & list_viewable & "',LIST_FEATURED = " & list_featured & "',LIST_LAKE = '" & list_lake & "'"

you're missing closing the string at the end.

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseSQL Development > Syntax error (missing operator) in query expression


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 | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway