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 March 26th, 2000, 09:57 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
Not specified

<i><b>Originally posted by : Felicia (ong_felicia@hotmail.com)</b></i><br />Can an expert help me on this...<br /><br />I don't quite understand about the below error...<br /><br />Select * from [_UserInfo] where Loginname like 'Felicia'Select * from [_CompanyInfo] where PriSalesRep like 'Kelvin Yue'SecSalesRep like 'Dave Heng' <br />Microsoft OLE DB Provider for ODBC Drivers error '80040e14' <br />[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near 'SecSalesRep'. <br />/sis/CfmSalesRep.asp, line 19 <br /><br />below is my code:<br /><br /><% <br /> set RST = Server.CreateObject("ADODB.Recordset")<br /> loginname = Request.QueryString("loginname")<br /> sql ="Select * from [_UserInfo] where Loginname like '" & loginname & "'"<br /> response.write sql<br /> RST.Open sql,Session("FlipConnection"),ADOPENSTATIC,ADLOCKPESSIMISTIC,ADCMDTEXT<br /> RST("Rights")=100<br /> RST("Confirmed")=1<br /> RST.Update<br /> <br /> set RST1 = Server.CreateObject("ADODB.Recordset")<br /> PriSalesRep = Request.QueryString("PriSalesRep")<br /> SecSalesRep = Request.QueryString("SecSalesRep")<br /> sql1 ="Select * from [_CompanyInfo] where PriSalesRep like '" & PriSalesRep & "'" & "SecSalesRep like '" & SecSalesRep & "'"<br /> response.write sql1<br /> RST1.Open sql1,Session("FlipConnection"),ADOPENSTATIC,ADLOCKPESSIMISTIC,ADCMDTEXT<br /> RST1("Confirmed")=1<br /> RST1("PriSalesRep")=PriSalesRep<br /> RST1("SecSalesRep")=SecSalesRep<br /> RST1.Update<br /><br /><br /><br /> RST.Close<br /> Set RST = Nothing<br /> RST1.close<br /> set RST1 = nothing<br /> <br /><br />%><br /><br />many thanks..<br />

Reply With Quote
  #2  
Old March 31st, 2000, 09:08 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 : David B (david_baylor@yahoo.com)</b></i><br />Proper syntax for the second call is<br /><br /><br />select * from table where field1 like 'xxx' and field2 like 'yyy'<br /><br />You forgot the word "and"<br /><br /><br />------------<br />Felicia at 3/26/2000 7:57:55 PM<br /><br />Can an expert help me on this...<br /><br />I don't quite understand about the below error...<br /><br />Select * from [_UserInfo] where Loginname like 'Felicia'Select * from [_CompanyInfo] where PriSalesRep like 'Kelvin Yue'SecSalesRep like 'Dave Heng' <br />Microsoft OLE DB Provider for ODBC Drivers error '80040e14' <br />[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near 'SecSalesRep'. <br />/sis/CfmSalesRep.asp, line 19 <br /><br />below is my code:<br /><br /><% <br /> set RST = Server.CreateObject("ADODB.Recordset")<br /> loginname = Request.QueryString("loginname")<br /> sql ="Select * from [_UserInfo] where Loginname like '" & loginname & "'"<br /> response.write sql<br /> RST.Open sql,Session("FlipConnection"),ADOPENSTATIC,ADLOCKPESSIMISTIC,ADCMDTEXT<br /> RST("Rights")=100<br /> RST("Confirmed")=1<br /> RST.Update<br /> <br /> set RST1 = Server.CreateObject("ADODB.Recordset")<br /> PriSalesRep = Request.QueryString("PriSalesRep")<br /> SecSalesRep = Request.QueryString("SecSalesRep")<br /> response.write sql1<br /> RST1.Open sql1,Session("FlipConnection"),ADOPENSTATIC,ADLOCKPESSIMISTIC,ADCMDTEXT<br /> RST1("Confirmed")=1<br /> RST1("PriSalesRep")=PriSalesRep<br /> RST1("SecSalesRep")=SecSalesRep<br /> RST1.Update<br /><br /><br /><br /> RST.Close<br /> Set RST = Nothing<br /> RST1.close<br /> set RST1 = nothing<br /> <br /><br />%><br /><br />many thanks..<br />

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingASP Development > Not specified


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
Stay green...Green IT