Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help Connecting to Oracle DB with ASP Page 2

Status
Not open for further replies.

campbere

Technical User
Oct 10, 2000
146
US
I am working on my first ASP page. I am using Oracle 8.1.7 database and can't seem to get connected. I tried looking at books and they also use MS Access examples.

Can someone help walk me through this? This is what I had to start with but I am not even sure if I was close.

<%
Dim objConn
Dim RS

Set objConn = Server.CreateObject(&quot;ADODB.Connection&quot;)
objConn.Open DVROCKY, tester, test_pwd


Set RS = Server.CreateObject(&quot;ADODB.Recordset&quot;)

RD.Open &quot;SELECT * from western_products where item ='00000000'&quot;
%>

I appreciate all the help.

Thank you in advance.
 
Hi,

you should be able to connect to the database, but you will ned to make sure that the db has a role/user set up that will allow to use the db in a limited fashion, ie select and update statements only for the majority of the users...

If you are using interdev to develop the page, you might want to try the DataConnection wizard to connect to the db, this is in the Global ASA folder and then copy the code from that to the page itself where you want to make the connection.

Using DataConnection object will help you get the path correct to the db... Bastien

There are many ways to skin this cat,
but it still tastes like chicken
 
Hi!

You need a connection string:

strConnection = &quot;Provider=MSDAORA.1;Password=myPass;User ID=myUser;Data Source=myData;Persist Security Info=True;User Id=myUser;PASSWORD=myPass;&quot;

where myData is the name that you gave to the service using Oracle Net8 easy config

Now open the connection:

objConn.Open strConnnection

Glezy

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top