Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

query oracle db with asp or other server-side scripting

Posted on 2010-11-08
2
Medium Priority
?
442 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 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

722 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