Solved

Store ASP formular in SQL

Posted on 2004-09-28
1
201 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
Comment Utility
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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now