Solved

query oracle db with asp or other server-side scripting

Posted on 2010-11-08
2
436 Views
Last Modified: 2012-05-10
oracle 10g r2 database
server 2003 r2/iis web server

i have a website that has a few dynamic requirements
this is being used with livelink web forms 9.7.2 however i can generalize the question

a html website comprised mostly of forms (text boxes and drop-downs) will need to have a few html tables hidden/shown based on two oracle db lookups.  i was wondering if asp could help me achieve this goal?  of course with some javascript to hide/show the tables.

a website is going to load with a text box already containing a value.  this text box is called
LL_FormTag_1_2_1

the value in that text box is a unique id which will be used to query a specific row in the LL_PAF_Form table.  in the LL_PAF_From table there is a column titled ProjectNumber and this value is what's contained in the LL_FormTag_1_2_1 text box. i need to return results from this row which will help to build the next query.

i need to query how many managers are required to approve an order.  the number of managers required exists in the LL_PAF_Form table, column ManagersRequired.  this is a number, 1-6.  if the value is 4, then 4 html tables will be shown (hence the javascript)

select ManagersRequired from LL_PAF_Form where ProjectNumber =  **ValueFromFirstQuery**


from a high level:
- query oracle db
- hide/show html tables based on query results

thanks for the help!!!
0
Comment
Question by:sknoll84
[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
  • 2
2 Comments
 
LVL 25

Accepted Solution

by:
jrb1 earned 500 total points
ID: 34102987
Sure, something like this will pull Oracle into ASP:

<%
  Set OraSession  = Server.CreateObject("OracleInProcServer.XOraSession")
  Set OraDatabase = OraSession.DbOpenDatabase("connect_str.world", "userid/password",cint(0))

  Set osRecordSet = OraDatabase.DbCreateDynaset("SELECT ManagersRequired FROM LL_PAF_Form where ProjectNumber =" & projectNum, cint(0))              

  If osRecordset.EOF = FALSE Then
     Response.write(osRecordset.Fields("TNAME") & " ")
  End If

  Set OraSession = Nothing
%>

Here are a couple of good pages to look at:

http://www.asp101.com/articles/colin/oracle/default.asp
http://www.orafaq.com/wiki/ASP
0
 
LVL 25

Expert Comment

by:jrb1
ID: 34102997
One change....

Response.write(osRecordset.Fields("ManagersRequired") & " ")
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

Suggested Solutions

This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

710 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