Re: Running SQL statement from table... by Tony
Tony
Wed Sep 13 10:03:34 CDT 2006
Basically,
I have been given a website to look after / upgrade, I discovered 28 pages
that were very alike... apart from the SQL.
So stored the SQL in a table, and then just call it via a
Request.QueryString("PageID") to determine which SQL to use.
So, my question is can it be done this way, or shall I find another tree to
bark at...
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:uHoMYP01GHA.2196@TK2MSFTNGP06.phx.gbl...
> Mind if I ask why on earth you have that stored in a database? Why do you
> have code in a database instead of in a source code file?
>
> Ray at work
>
> "Tony Doyle" <tony@nospam.com> wrote in message
> news:uN6iOK01GHA.4448@TK2MSFTNGP04.phx.gbl...
>> All,
>>
>> I have a table with the following SQL statement inside it...
>>
>> SELECT * from tblPerson Where PersonID=" &
>> request.querystring("PersonID")
>>
>> How can I retreive this and execute it via vbscript to populate another
>> recordset...
>>
>> Cheers
>>
>> Td
>>
>>
>>
>
>