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 27th, 2000, 07:07 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
Variables in SQL string

<i><b>Originally posted by : Paul (pwil22@hotmail.com)</b></i><br />How do you use variables in an SQL string?<br /><br />The ID I have is stored in a variable called "thisdelegateid".<br /><br />How do I use this as a value in an SQL string to populate a table?<br /><br />i.e.<br /><br />SQL2 = "INSERT into Registration ([Conference Code], [Delegate ID]" &_ <br />"[Internet Reg], [Paying Organisation ID], MeetingFeesCode, " & _<br />"[Name Required]) VALUES ('ITMA 13th Annual Meeting', " &_<br />??????????, True, '" & _<br />Request.Form("txtPaying") & "','" & _<br />Request.Form("cboFees") & "','" & _<br />Request.Form("txtName") & "')" <br /><br />the variable "thisdelegateid" is a number.<br /><br />Any help any one could give me would be greatly appreciated <br /><br />Thanks<br /><br />Paul<br />

Reply With Quote
  #2  
Old March 27th, 2000, 08:55 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 : steve</b></i><br />strSampleValue = request("afieldfromform")<br />strsql3 = ""<br />strSQL3 = "INSERT INTO tblName(tblName.Value1, tblName.Value2) "<br />strSQL3 = strSQL3 & " SELECT "<br />strSQL3 = strSQL3 & "'" & strSampleValue & "' as text1, " <br />strSQL3 = strSQL3 & " request.form("somefieldwithnumbers") & " as text2 "<br /><br />here is some sample code using variables.<br /><br /><br />------------<br />Paul at 3/27/2000 5:07:28 AM<br /><br />How do you use variables in an SQL string?<br /><br />The ID I have is stored in a variable called "thisdelegateid".<br /><br />How do I use this as a value in an SQL string to populate a table?<br /><br />i.e.<br /><br />SQL2 = "INSERT into Registration ([Conference Code], [Delegate ID]" &_ <br />"[Internet Reg], [Paying Organisation ID], MeetingFeesCode, " & _<br />"[Name Required]) VALUES ('ITMA 13th Annual Meeting', " &_<br />??????????, True, '" & _<br />Request.Form("txtPaying") & "','" & _<br />Request.Form("cboFees") & "','" & _<br />Request.Form("txtName") & "')" <br /><br />the variable "thisdelegateid" is a number.<br /><br />Any help any one could give me would be greatly appreciated <br /><br />Thanks<br /><br />Paul<br />

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingASP Development > Variables in SQL string


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