SunQuest
 
           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:
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old May 2nd, 2008, 02:03 PM
upperme upperme is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2008
Posts: 1 upperme User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 m 49 sec
Reputation Power: 0
Syntax error (missing operator) in query expression 'Zip_Code ='

Hi everyone,

I have a problem that I cannot seem to track down... this one has me baffled, or maybe I am just missing something simple. Any help would be greatly appreciated.

Thanks very much,

Jim

Here is the error:
Syntax error (missing operator) in query expression 'Zip_Code ='

Now here is a chunk of my code:

Code:
<!--#include file="config.asp"-->
<% if request.form("submit") <> "" then
	
	qs = "?page=" & request.querystring("page") & "&order=" & request.querystring("order")
	
	Set asplconn = Server.CreateObject("ADODB.Connection")
	asplconn.Open dbconn
	
	select case request.form("submit")
		case "Add New","Update"
			
			set rsLatLon = asplconn.execute("select * from aspL_Zips where Zip_Code = " & request.form("Zip"))
			
			if not rsLatLon.eof then
				Lat = rsLatLon("Zip_Lat")
				Lon = rsLatLon("Zip_Lon")
			end if
			
			rsLatLon.Close
			set rsLatLon = nothing
			
			Set rsLocations = CreateObject("ADODB.Recordset")
			
			if request.form("submit") = "Add New" then
				strSQL = "select * from aspL_Locations where Location_Id = 0"
			else
				strSQL = "select * from aspL_Locations where Location_Id = " & request("location")
			end if
			
			rsLocations.Open strSQL, asplconn, 1, 3
			
			if request.form("submit") = "Add New" then
				rsLocations.AddNew
			end if
			
			rsLocations("Location_Name") = request.form("Name")
			rsLocations("Location_Address") = request.form("Address")
			rsLocations("Location_City") = request.form("City")
			rsLocations("Location_State") = request.form("state")
			rsLocations("Location_Zip") = request.form("Zip")
			rsLocations("Location_Phone") = request.form("Phone")
			rsLocations("Location_Fax") = request.form("Fax")
			rsLocations("Location_Email") = request.form("Email")
			rsLocations("Location_Website") = request.form("Website")
			rsLocations("Location_Lat") = Lat
			rsLocations("Location_Lon") = Lon
			
			rsLocations.Update
			rsLocations.Close
			set rsLocations = nothing
			
			if request.form("submit") = "Add New" then
				session("asplmsg") = "New location successfully added."
			else
				session("asplmsg") = "Location successfully updated."
			end if
			
		case "Remove"
			
			set rsDelete = asplconn.execute("select * from aspL_Locations where location_id = " & request.querystring("location"))
			
			if not rsDelete.eof then
				asplconn.execute("delete from aspL_Locations where location_id = " & request.querystring("location"))
				session("asplmsg") = "The selected location was removed."
			else
				session("asplmsg") = "There was a problem removing the selected location."
			end if
			
			rsDelete.Close
			set rsDelete = nothing
			
	end select
	
	asplconn.Close
	set asplconn = nothing
	
	response.redirect "admin.asp" & qs
end if %>

Reply With Quote
Reply

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


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 1 hosted by Hostway