Solved

Store ASP formular in SQL

Posted on 2004-09-28
1
203 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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
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…

770 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