Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Database > Oracle ASP
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Oracle ASP Using ASP with Oracle databases. For Oracle discussions not specific to ASP, please see the Oracle forum. For more ASP discussions, please see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle ASP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 14th, 2003, 09:59 AM
Registered User
 
Join Date: Aug 2003
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Connecting Oracle Database with an ASP page

Hi,

   I want to do a small survey on the net and I wanna store that data in a oracle database. I did the same using Access and it worked well.

   Can anyone help me out in connecting an ASP page with an oracle database. I'd appreciate if anyone provides the code.
  #2 (permalink)  
Old October 12th, 2003, 04:07 PM
Registered User
 
Join Date: Oct 2003
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to TwoCoby
Default

Here is the connection string I use in my ASP code:
-------------------------------
<%
set cnn = Server.CreateObject("ADODB.Connection")
cnnStr ="Provider=ORAOLEDB.Oracle;Data Source=summer5;User ID=scott;Password=tiger;"
cnn.Open cnnStr
%>
-------------------------------
Where Source is the SID in the tnsnames.ora file ... it's also the same as the Service Name in the tnsnames.ora file. (Pretty much it's the name of your Oracle database).

Any questions maybe I can help. Just email me!

Thanks!
-Coby

  #3 (permalink)  
Old October 11th, 2004, 11:34 AM
Registered User
 
Join Date: Oct 2004
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi!,
I was trying that connection using Oracle9i and is giving me this error, but if I do it with Oracle8i it works perfectly.
Error:
ADODB.Connection (0x800A0E7A)
Provider cannot be found. It may no be properly installed.

If you have the answer to this error, please send me an email to any of this addresses:
1) luis.bueno@cemcolon.com.do
2) acde128@hotmail.com

Thanks...

Quote:
quote:Originally posted by TwoCoby
 Here is the connection string I use in my ASP code:
-------------------------------
<%
set cnn = Server.CreateObject("ADODB.Connection")
cnnStr ="Provider=ORAOLEDB.Oracle;Data Source=summer5;User ID=scott;Password=tiger;"
cnn.Open cnnStr
%>
-------------------------------
Where Source is the SID in the tnsnames.ora file ... it's also the same as the Service Name in the tnsnames.ora file. (Pretty much it's the name of your Oracle database).

Any questions maybe I can help. Just email me!

Thanks!
-Coby

  #4 (permalink)  
Old November 14th, 2004, 05:56 PM
Registered User
 
Join Date: Nov 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try a function with a different provider....
Put the connection function in an asp

connection to Oracle(ADOFunctions_inc.asp)
<%
Function GetDBConnection()

Dim objConnection
Set objConnection = Server.CreateObject("ADODB.Connection")

With objConnection
.ConnectionString = "Provider=MSDAORA; " & _
"Data Source=your_database; " & _
"User ID=scott; Password=tiger;"
.Open

End With
Set GetDBConnection = objConnection

End Function
%>

Then include the file in your server pages.


then you can simpley use its methods...i.e
Set objRecordset = GetDBConnection().Execute(varSQL)
good luck....


 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Connecting to oracle database in struts Manvi Struts 3 August 7th, 2006 10:53 PM
connecting oracle with asp.net rajatake General .NET 2 June 28th, 2005 01:45 AM
Exception connecting to Oracle Database with JDBC celia05es Java Databases 1 March 31st, 2004 04:42 AM
Creating and connecting in a Oracle Database cutovoi Excel VBA 2 February 4th, 2004 07:06 PM
Connecting an oracle database kelitu Oracle 0 September 4th, 2003 09:18 AM



All times are GMT -4. The time now is 10:35 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.