Solved

Store ASP formular in SQL

Posted on 2004-09-28
1
204 Views
Last Modified: 2011-10-03
Hi,

This is quite simple and I'm sure it can be done (I hope!)

I simply want to store a formular in my table then retreive this and use it in my ASP page.

e.g.

In my table I have the following stored as a string:-

varLength*100

When I do my sql query:-


varLength=2.4

set oRSeofd99a=Server.CreateObject("ADODB.recordset")
sqltext99a="Select * from MM2_LU_UOM_Conversion where BUOM ='"&varBUOM&"' AND AUOM='"&varAUOM&"'"
oRSeofd99a.open sqltext99a, "dsn=*;uid=*;pwd=*"
 
varDemonitor=oRSeofd99a("ConversionX")

'if I print varDemonitor it prints as "varLength*100"  I want it to print as "240"

'I'm sure its just the way I call it from the DB,  

Can anyone help?

many thanks!

0
Comment
Question by:Pigdogmonster
1 Comment
 
LVL 1

Accepted Solution

by:
cheluto2 earned 40 total points
ID: 12171081
Depending on what version of IIS you are using, you can use the "eval" method to display the results, like this:

varDemonitor= oRSeofd99a("ConversionX")

Response.Write eval(varDemonitor)


This will evaluate whatever expression is in the variable and execute it as code, if possible.  You may need to add error handling just in case, too.

Hope this helps.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question