Connecting to Oracle database from web page using Visual Studio/Visual Basic

Tags:
Development
DHCP
DNS
Networking
Networking services
Web development tools
I have been able to use OleDB to connect to Oracle databases with no problem in Windows forms applications on my development machine that is both my IIS server and Oracle server. But when I try to do it in a Web application I get the error message 'Oracle client and networking components not found'. This is the sytax I use for the connection: OleDb.OleDbConnection("Provider=MSDAORA.1;User ID=tpocs;Password=manager;Data Source=tdsbasic;persist security info=False"). Can anyone help? Thanks.

Answer Wiki

Thanks. We'll let you know when a new response is added.

Oracle has .Net managed drivers download those at the following url:

http://search.microsoft.com/search/results.aspx?View=en-us&p=1&c=1&st=b&qu=oracle+managed+provider+for+.net&swc=1&na=33&cm=512

Once you install those you need to add refrence to
System.data.oracleClient.dll.

Try those…

here is the code to do it..

Public Const strConn As String = “Data Source=ORACLESERVERNAME;User ID=USERID;Password=PASSWORD;”

you have to substitute the ORACLESERVERNAME AND USERID AND PASSWORD in your environment..

here is the rest of it

Dim strDSQL As String = “select * from oracledb”
Dim daDetail As New OracleClient.OracleDataAdapter(strDSQL, strConn)
Dim ds As New DataSet()
daDetail.Fill(ds)
Thats it..

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following