ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingASP 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 February 15th, 2000, 03:51 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
asp does not see &

<i><b>Originally posted by : Kirk (kirk@zebraenv.com)</b></i><br />I'm trying to run a query based on an ID number passed in the querystring. The problem is that I concatonate the ID number variable to the SQL query string and this concatonated variable is not seen by the database! Here's the code:<br /><%<br />dim strid<br />strid = Request.querystring("compid")<br />%><br /><html><body><br /><!--#include file = "dataconn.asp"--><br /><%=strid%><br /><%strquery = "SELECT clientcompany.*, clientoffice.* "<br />strquery = strquery&"FROM clientcompany, clientoffice "<br />strquery = strquery&"WHERE clientcompany.id = "&strid<br />strquery = strquery&" AND clientoffice.clientcompany_id = "&strid<br />strquery = strquery&" ORDER BY state, city"<br />set objRS = objconn.execute (strquery)%><br /><br />The following is the error I'm receiving:<br /><br />Microsoft OLE DB Provider for ODBC Drivers error '80040e14' <br /><br />[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'clientcompany.id = AND clientoffice.clientcompany_id ='. <br /><br />/zoffice/zebra01/kirk's files/company.asp, line 15 <br /><br />The weird thing is that I've got the exact same ASP files running on a server at home, and the code works fine!!!!!!<br />Please help!<br /><br /><br />

Reply With Quote
  #2  
Old February 15th, 2000, 06:45 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
<i><b>Originally posted by : steve</b></i><br />can you write out the querystring value. <br /><br />like <% response.write Request.querystring("compid") to even see if the value is getting passed into this?<br /><br />steve<br /><br /><br />------------<br />Kirk at 2/15/2000 1:51:36 PM<br /><br />I'm trying to run a query based on an ID number passed in the querystring. The problem is that I concatonate the ID number variable to the SQL query string and this concatonated variable is not seen by the database! Here's the code:<br /><%<br />dim strid<br />strid = Request.querystring("compid")<br />%><br /><html><body><br /><!--#include file = "dataconn.asp"--><br /><%=strid%><br /><%strquery = "SELECT clientcompany.*, clientoffice.* "<br />strquery = strquery&"FROM clientcompany, clientoffice "<br />strquery = strquery&"WHERE clientcompany.id = "&strid<br />strquery = strquery&" AND clientoffice.clientcompany_id = "&strid<br />strquery = strquery&" ORDER BY state, city"<br />set objRS = objconn.execute (strquery)%><br /><br />The following is the error I'm receiving:<br /><br />Microsoft OLE DB Provider for ODBC Drivers error '80040e14' <br /><br />[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'clientcompany.id = AND clientoffice.clientcompany_id ='. <br /><br />/zoffice/zebra01/kirk's files/company.asp, line 15 <br /><br />The weird thing is that I've got the exact same ASP files running on a server at home, and the code works fine!!!!!!<br />Please help!<br /><br /><br />

Reply With Quote
  #3  
Old February 16th, 2000, 11:16 AM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
<i><b>Originally posted by : Kirk (kirk@zebraenv.com)</b></i><br />Yes. I did that and the querystring is being passed perfectly.<br /><br /><br />------------<br />steve at 2/15/2000 4:45:46 PM<br /><br />can you write out the querystring value. <br /><br />like <% response.write Request.querystring("compid") to even see if the value is getting passed into this?<br /><br />steve<br /><br /><br />------------<br />Kirk at 2/15/2000 1:51:36 PM<br /><br />I'm trying to run a query based on an ID number passed in the querystring. The problem is that I concatonate the ID number variable to the SQL query string and this concatonated variable is not seen by the database! Here's the code:<br /><%<br />dim strid<br />strid = Request.querystring("compid")<br />%><br /><html><body><br /><!--#include file = "dataconn.asp"--><br /><%=strid%><br /><%strquery = "SELECT clientcompany.*, clientoffice.* "<br />strquery = strquery&"FROM clientcompany, clientoffice "<br />strquery = strquery&"WHERE clientcompany.id = "&strid<br />strquery = strquery&" AND clientoffice.clientcompany_id = "&strid<br />strquery = strquery&" ORDER BY state, city"<br />set objRS = objconn.execute (strquery)%><br /><br />The following is the error I'm receiving:<br /><br />Microsoft OLE DB Provider for ODBC Drivers error '80040e14' <br /><br />[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'clientcompany.id = AND clientoffice.clientcompany_id ='. <br /><br />/zoffice/zebra01/kirk's files/company.asp, line 15 <br /><br />The weird thing is that I've got the exact same ASP files running on a server at home, and the code works fine!!!!!!<br />Please help!<br /><br /><br />

Reply With Quote
  #4  
Old February 24th, 2000, 04:13 AM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
<i><b>Originally posted by : Chris Snider (csnider@worldnet.att.net)</b></i><br />It appears as though you need spacing around teh concatenation operator (the &)<br />Rewrite each line as<br />strquery = strquery & "WHERE clientcompany.id = " & strid<br /><br />This should clear up the problem<br /><br /><br /><br />------------<br />Kirk at 2/16/2000 9:16:08 AM<br /><br />Yes. I did that and the querystring is being passed perfectly.<br /><br /><br />------------<br />steve at 2/15/2000 4:45:46 PM<br /><br />can you write out the querystring value. <br /><br />like <% response.write Request.querystring("compid") to even see if the value is getting passed into this?<br /><br />steve<br /><br /><br />------------<br />Kirk at 2/15/2000 1:51:36 PM<br /><br />I'm trying to run a query based on an ID number passed in the querystring. The problem is that I concatonate the ID number variable to the SQL query string and this concatonated variable is not seen by the database! Here's the code:<br /><%<br />dim strid<br />strid = Request.querystring("compid")<br />%><br /><html><body><br /><!--#include file = "dataconn.asp"--><br /><%=strid%><br /><%strquery = "SELECT clientcompany.*, clientoffice.* "<br />strquery = strquery&"FROM clientcompany, clientoffice "<br />strquery = strquery&"WHERE clientcompany.id = "&strid<br />strquery = strquery&" AND clientoffice.clientcompany_id = "&strid<br />strquery = strquery&" ORDER BY state, city"<br />set objRS = objconn.execute (strquery)%><br /><br />The following is the error I'm receiving:<br /><br />Microsoft OLE DB Provider for ODBC Drivers error '80040e14' <br /><br />[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'clientcompany.id = AND clientoffice.clientcompany_id ='. <br /><br />/zoffice/zebra01/kirk's files/company.asp, line 15 <br /><br />The weird thing is that I've got the exact same ASP files running on a server at home, and the code works fine!!!!!!<br />Please help!<br /><br /><br />

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingASP Development > asp does not see &


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 6 hosted by Hostway
Stay green...Green IT