Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Nested Variables in asp

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,615
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> Nested Variables in asp
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Nested Variables in asp - 4/21/2002 12:17:16 AM   
  edcrosbys

 

Posts: 1
Score: 0
Joined: 4/21/2002
From:
Status: offline
I'm not sure if what I'm trying can be done. I have the following situation:

variables:

sql_jobid
sql_description
....etc

where jobid, description, etc are fields from my database.

I would like to call these variables into an if, then reading the second part of the variable from the database so I don't have to type out the same thing 40 times... Here's what I'm trying (who knows if the syntax is right though):

sql = "select * from jobs where"
first = "true"
do until rs.EOF
for each x in rs.fields
if first = "true" then
sql = sql + sql_(x.name)
first = "false"
else
sql = sql + sql_(x.name)
end if
next
rs.MoveNext
loop
sql = sql + ";"
 
 
Post #: 1
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> Nested Variables in asp Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts