PC Review


Reply
Thread Tools Rate Thread

Connecting to Oracle 9i

 
 
va
Guest
Posts: n/a
 
      22nd Dec 2003
I am trying to establish a connection to Oracle 9i from
asp.net.(.net 2003) The code is

Dim con As New ADODB.Connection

con.ConnectionString = "PROVIDER=MSDASQL;DRIVER=
{Microsoft ODBC for oracle};SERVER={server name};UID={user
id};PWD={password};"

con.Open()

It gives error message [Microsoft][ODBC driver for Oracle]
[Oracle]

If I use the same code in VB 6.0 it works. I am using
Windows 2000 operating system. If I try from Windows XP
it works from asp.net after changing security for
ociw32.dll. I tried to do the same on Windows 2000.
Still it does not work. Any other way of making it work?
 
Reply With Quote
 
 
 
 
Miha Markic
Guest
Posts: n/a
 
      23rd Dec 2003
Hi,

You should use System.Data.Oracle namespace and the classes within
(OracleConnection etc.) - managed providers.

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

"va" <(E-Mail Removed)> wrote in message
news:092501c3c8dc$16a9c150$(E-Mail Removed)...
> I am trying to establish a connection to Oracle 9i from
> asp.net.(.net 2003) The code is
>
> Dim con As New ADODB.Connection
>
> con.ConnectionString = "PROVIDER=MSDASQL;DRIVER=
> {Microsoft ODBC for oracle};SERVER={server name};UID={user
> id};PWD={password};"
>
> con.Open()
>
> It gives error message [Microsoft][ODBC driver for Oracle]
> [Oracle]
>
> If I use the same code in VB 6.0 it works. I am using
> Windows 2000 operating system. If I try from Windows XP
> it works from asp.net after changing security for
> ociw32.dll. I tried to do the same on Windows 2000.
> Still it does not work. Any other way of making it work?



 
Reply With Quote
 
Miha Markic
Guest
Posts: n/a
 
      23rd Dec 2003
It is OracleClient and not Oracle namespace...

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

"Miha Markic" <miha at rthand com> wrote in message
news:%(E-Mail Removed)...
> Hi,
>
> You should use System.Data.Oracle namespace and the classes within
> (OracleConnection etc.) - managed providers.
>
> --
> Miha Markic - RightHand .NET consulting & software development
> miha at rthand com
> www.rthand.com
>
> "va" <(E-Mail Removed)> wrote in message
> news:092501c3c8dc$16a9c150$(E-Mail Removed)...
> > I am trying to establish a connection to Oracle 9i from
> > asp.net.(.net 2003) The code is
> >
> > Dim con As New ADODB.Connection
> >
> > con.ConnectionString = "PROVIDER=MSDASQL;DRIVER=
> > {Microsoft ODBC for oracle};SERVER={server name};UID={user
> > id};PWD={password};"
> >
> > con.Open()
> >
> > It gives error message [Microsoft][ODBC driver for Oracle]
> > [Oracle]
> >
> > If I use the same code in VB 6.0 it works. I am using
> > Windows 2000 operating system. If I try from Windows XP
> > it works from asp.net after changing security for
> > ociw32.dll. I tried to do the same on Windows 2000.
> > Still it does not work. Any other way of making it work?

>
>



 
Reply With Quote
 
Paul Clement
Guest
Posts: n/a
 
      23rd Dec 2003
On Mon, 22 Dec 2003 14:36:49 -0800, "va" <(E-Mail Removed)> wrote:

¤ I am trying to establish a connection to Oracle 9i from
¤ asp.net.(.net 2003) The code is
¤
¤ Dim con As New ADODB.Connection
¤
¤ con.ConnectionString = "PROVIDER=MSDASQL;DRIVER=
¤ {Microsoft ODBC for oracle};SERVER={server name};UID={user
¤ id};PWD={password};"
¤
¤ con.Open()
¤
¤ It gives error message [Microsoft][ODBC driver for Oracle]
¤ [Oracle]
¤
¤ If I use the same code in VB 6.0 it works. I am using
¤ Windows 2000 operating system. If I try from Windows XP
¤ it works from asp.net after changing security for
¤ ociw32.dll. I tried to do the same on Windows 2000.
¤ Still it does not work. Any other way of making it work?

Is there a reason why you are using ADO instead of ADO.NET?

You should be using Oracle specific drivers:

http://www.able-consulting.com/MDAC/...eFromMicrosoft
http://www.able-consulting.com/MDAC/...riverForOracle


Paul ~~~ (E-Mail Removed)
Microsoft MVP (Visual Basic)
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
connecting to Oracle from ASP.NET 2.0 ? jobs Microsoft ASP .NET 1 7th Jun 2007 09:35 PM
Problems connecting to Oracle 9i database with Oracle 10g Client and Win XP x64 Sacha Korell Microsoft ADO .NET 2 17th Oct 2006 11:05 PM
error while connecting to oracle from Microsoft .net data provider for oracle Reny J Joseph Thuthikattu Microsoft VB .NET 8 16th Aug 2004 12:48 PM
Re: error while connecting to Oracle using Microsoft .NEt oracle client Bob Clegg Microsoft VB .NET 0 1st Apr 2004 11:18 AM
Problems connecting to Oracle using Oracle Provider for .Net Framwork RDF Microsoft ADO .NET 1 13th Aug 2003 10:09 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:50 PM.