codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Running ASP code from a database  Archive Import (Hans Dreve) at 05:53 on Friday, January 03, 2003
 

Hi,
I wonder if it is possible to run asp (or vbscript) codes from a database.
What I want is a smal script that decides on the input it gets, what code it will use and that code is in a database.

i.e. Someone clicks on 'What is the date of today'. The answer would be showed using <%=date%>. But this would mean that I have to make a seperate page for only this function.
Now they click on 'What is the weekday'. The answer would be showed using something like <%=weekday(now)%>. But this is again a new page.
Now I could use only one page to display all and let it look at what has been clicked, but that would mean I have to put all this code in the script itself.

I'm now trying to get the code from a database, ie (open database and table start reading the contents); code=rs("code")
Then the string variable code should be shown. In the case of the date this would be something like <%=date%> in the database.

When I use <%=code%> then nothing shows, but when I look in the source of the page, then I see <%=date%> on the right spot.

Is there a way to get the ASP compiler to also compile these kind of items or is this something that ASP can't do?

It's just something that I want to find out, not that it is something that I realy need, I just want to learn more about the way ASP works and what is can do.
Up till now, I have found all out myself, but this is something that I just can't figure out and that bugs me.

Thanks for any response!

Hans

  Re: Running ASP code from a database  gracie20 at 06:55 on Wednesday, August 20, 2008
 

hello..please can anyone tell me....how can i run ASP code from a database.
Thanks in advance

Gracie Sh
http://hdtvlcdplasma.com










CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  image and form fieild upload problem
•  Multiplying currency
•  Java Garbage Collection Boot Camp
•  validations fo form fields
•  Setting page size at which scroll bars appear in browser window (javascript)
•  before executing a function
•  how to write a code in asp.net to create a glossary .
•  I am trying to run a programme which is using PGPLOT.When I call it from browser I get following error message.
•  Re: open excel file in html page


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2010