Solved

Store ASP formular in SQL

Posted on 2004-09-28
1
207 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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…
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/…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

631 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