|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
possible to store server side scripts on sql server?i intend to save some asp scripts on the server. eg: i store this script on the server <%="hello"%> i save this under table "table1" , column name "title" then i proceed to write out the server script: set rs = conn.execute("select title from table1") response.write rs("title") but the results doesnt execute the stored asp script. am i doing the wrong way? i intend to store some asp server scripts on the server... thanks Posted Via Usenet.com Premium Usenet Newsgroup Services ---------------------------------------------------------- ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY ** ---------------------------------------------------------- http://www.usenet.com
Show quote
Hide quote
"User" <user@email> wrote in message You're just returning the string of ASP code.news:1167414683_4507@sp6iad.superfeed.net... > HI, > > i intend to save some asp scripts on the server. > > eg: i store this script on the server > > <%="hello"%> > > i save this under table "table1" , column name "title" > > then i proceed to write out the server script: > > set rs = conn.execute("select title from table1") > response.write rs("title") > > but the results doesnt execute the stored asp script. > > am i doing the wrong way? > > i intend to store some asp server scripts on the server... Try using Eval() to apply it -- untested. On Fri, 29 Dec 2006 12:29:01 -0600, McKirahan <N***@McKirahan.com> wrote=
Show quoteHide quote : That has a lot of limitations. Foremost, it's highly insecure, but it al=> "User" <user@email> wrote in message > news:1167414683_4507@sp6iad.superfeed.net... >> HI, >> >> i intend to save some asp scripts on the server. >> >> eg: i store this script on the server >> >> <%=3D"hello"%> > > You're just returning the string of ASP code. > > Try using Eval() to apply it -- untested. so = defeats IIS's script context caching (so every statement will have to be= = recompiled with every page load), prevents you from keeping your code = under revision control, and makes it impossible to use templates (i.e., = = you would need to use Response.Write "hello" rather than <%=3D "hello" %= >). A better design might be to store an identifier in the table, and then u=se = GetRef() to resolve it to a function, e.g: <% Set rs =3D conn.Execute("SELECT title FROM table1") Set f =3D GetRef(rs("title")) f() %> <% Function SayHello() %> hello <% End Function %> -- = Justin Piper Bizco Technologies http://www.bizco.com/ Thanks !
Got it! I've used Execute() instead. Without the eval() tip, i wouldnt have found execute() =) Show quoteHide quote "McKirahan" <N***@McKirahan.com> wrote in message Posted Via Usenet.com Premium Usenet Newsgroup Servicesnews:FeWdnU7Blfx9wAjYnZ2dnUVZ_silnZ2d@comcast.com... > "User" <user@email> wrote in message > news:1167414683_4507@sp6iad.superfeed.net... >> HI, >> >> i intend to save some asp scripts on the server. >> >> eg: i store this script on the server >> >> <%="hello"%> >> >> i save this under table "table1" , column name "title" >> >> then i proceed to write out the server script: >> >> set rs = conn.execute("select title from table1") >> response.write rs("title") >> >> but the results doesnt execute the stored asp script. >> >> am i doing the wrong way? >> >> i intend to store some asp server scripts on the server... > > You're just returning the string of ASP code. > > Try using Eval() to apply it -- untested. > > ---------------------------------------------------------- ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY ** ---------------------------------------------------------- http://www.usenet.com You should read this:
http://blogs.msdn.com/ericlippert/archive/2003/11/01/53329.aspx User wrote: Show quoteHide quote > Thanks ! > > Got it! > > I've used Execute() instead. > > Without the eval() tip, i wouldnt have found execute() > > =) > > "McKirahan" <N***@McKirahan.com> wrote in message > news:FeWdnU7Blfx9wAjYnZ2dnUVZ_silnZ2d@comcast.com... >> "User" <user@email> wrote in message >> news:1167414683_4507@sp6iad.superfeed.net... >>> HI, >>> >>> i intend to save some asp scripts on the server. >>> >>> eg: i store this script on the server >>> >>> <%="hello"%> >>> >>> i save this under table "table1" , column name "title" >>> >>> then i proceed to write out the server script: >>> >>> set rs = conn.execute("select title from table1") >>> response.write rs("title") >>> >>> but the results doesnt execute the stored asp script. >>> >>> am i doing the wrong way? >>> >>> i intend to store some asp server scripts on the server... >> >> You're just returning the string of ASP code. >> >> Try using Eval() to apply it -- untested. >> >> > > > > Posted Via Usenet.com Premium Usenet Newsgroup Services > ---------------------------------------------------------- > ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY ** > ---------------------------------------------------------- > http://www.usenet.com -- Microsoft MVP - ASP/ASP.NET Please reply to the newsgroup. This email account is my spam trap so I don't check it very often. If you must reply off-line, then remove the "NO SPAM" "Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message That's for JScript not VBScript; though even that article states:news:OUzhuNALHHA.4376@TK2MSFTNGP03.phx.gbl... > You should read this: > http://blogs.msdn.com/ericlippert/archive/2003/11/01/53329.aspx "There are a few scenarios in which eval is invaluable.". [snip] > > "McKirahan" <N***@McKirahan.com> wrote in message [snip]> > news:FeWdnU7Blfx9wAjYnZ2dnUVZ_silnZ2d@comcast.com... Show quoteHide quote > >> Try using Eval() to apply it -- untested. McKirahan wrote:
> "Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message The same reasoning applies to Execute. A new compiler is spawned consuming > news:OUzhuNALHHA.4376@TK2MSFTNGP03.phx.gbl... >> You should read this: >> http://blogs.msdn.com/ericlippert/archive/2003/11/01/53329.aspx > > That's for JScript not VBScript; though even that article states: resources and impairing performance. Part two of the series (http://blogs.msdn.com/ericlippert/archive/2003/11/04/53335.aspx) describes the security hole opened by the use of these methods. > "There are a few scenarios in which eval is invaluable.". And this is not one of the situations he describes.> Justin described a perfectly workable alternative to Execute, but as usual, the alternatives look a little harder and the Execute/Eval crutch is picked up. -- Microsoft MVP - ASP/ASP.NET Please reply to the newsgroup. This email account is my spam trap so I don't check it very often. If you must reply off-line, then remove the "NO SPAM"
CDOSYS forms
Help with Updating Multiple Records via Looping Problem with loop Need help clarifying use of VBxxx for creating webpages ... sql question problem opening asp page Restrict page to open by date???? Error: 'HTTP/1.1 500 Internal Server Error' looking for mod 10 script <%=hyphen(stripit... help please! |
|||||||||||||||||||||||