If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > code smarter

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-26-10, 23:21
myle myle is offline
(Making Your Life Easy)
 
Join Date: Feb 2004
Location: New Zealand
Posts: 1,143
code smarter

I have this code which will display some on a web page for me
Code:
Sub Writeit(This,This1)
	Response.Write "< strong >" & This & "< / strong > = [" & This1 & "]<br>"
end sub
so if I pass call writeit("SQL",SQL)

I get SQL = [SELECT * FORM MYSTUFF]

is there a way so I do writeit(SQL)
i get the same out come
me just getting write the 2 value into the sub
__________________
hope this help

See clear as mud


StePhan McKillen
the aim is store once, not store multiple times
Remember... Optimize 'til you die!
Progaming environment:
Access based on my own environment: DAO3.6/A97/A2000/A2003
VB based on my own environment: vb6 sp5
ASP based on my own environment: 5.6
VB-NET based on my own environment started 2007
SQL-2005 based on my own environment started 2008
MYLE
Reply With Quote
  #2 (permalink)  
Old 10-27-10, 12:22
Teddy Teddy is offline
Purveyor of Discontent
 
Join Date: Mar 2003
Location: The Bottom of The Barrel
Posts: 6,075
How would it know what columns should be used as "This" and "This1"? I would shoot for something that accepts a recordset, a format string, and an array of column names to use against the format string. Maybe even use token delimiters (like {CurlyBraces}) in your format string and simply walk the record set for column names that match the terms you've wrapped in delimiters. If you're working in .NET, you already have a lot of this for free. Well, actually in .NET you would just use binding against a repeater, but I digress...
__________________
oh yeah... documentation... I have heard of that.

*** What Do You Want In The MS Access Forum? ***
Reply With Quote
  #3 (permalink)  
Old 01-09-11, 14:45
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
I think what the poster is asking is if you can pass a string that is also the name of a variable and have the variable name put out in bold and the value of the variable put out in standard.

From memory there is no way to do this in classic ASP (not even sure if you can do it in .Net to be honest).
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On