Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to connect ASP.Net with Oracle Database?

Reply
Thread Tools

How to connect ASP.Net with Oracle Database?

 
 
达达
Guest
Posts: n/a
 
      04-19-2005
How to connect asp.net with Oracle Database?
Where and How to? Thanks very much.


 
Reply With Quote
 
 
 
 
Juan T. Llibre
Guest
Posts: n/a
 
      04-19-2005
Standard:
"Data Source=MyOracleDB;Integrated Security=yes;"
This one works only with Oracle 8i release 3 or later

Specifying username and password:
"Data Source=MyOracleDB;User Id=username;Password=passwd;Integrated Security=no;"
This one works only with Oracle 8i release 3 or later

Declare the OracleConnection:

C#:
using System.Data.OracleClient;
OracleConnection oOracleConn = new OracleConnection();
oOracleConn.ConnectionString = "my connectionstring";
oOracleConn.Open();

VB.NET:
Imports System.Data.OracleClient
Dim oOracleConn As OracleConnection = New OracleConnection()
oOracleConn.ConnectionString = "my connectionstring"
oOracleConn.Open()



Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espa駉l
Ven, y hablemos de ASP.NET...
======================

"达达" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> How to connect asp.net with Oracle Database?
> Where and How to? Thanks very much.
>
>

 
Reply With Quote
 
 
 
 
Mikeda
Guest
Posts: n/a
 
      04-19-2005
Thanks very much.
But if i wanna use ODP.Net to connect with ASP.Net?
Is it better then yours?
Then I am beginner.Thank you.

"Juan T. Llibre" <(E-Mail Removed)> ????
news:#(E-Mail Removed)...
Standard:
"Data Source=MyOracleDB;Integrated Security=yes;"
This one works only with Oracle 8i release 3 or later

Specifying username and password:
"Data Source=MyOracleDB;User Id=username;Password=passwd;Integrated
Security=no;"
This one works only with Oracle 8i release 3 or later

Declare the OracleConnection:

C#:
using System.Data.OracleClient;
OracleConnection oOracleConn = new OracleConnection();
oOracleConn.ConnectionString = "my connectionstring";
oOracleConn.Open();

VB.NET:
Imports System.Data.OracleClient
Dim oOracleConn As OracleConnection = New OracleConnection()
oOracleConn.ConnectionString = "my connectionstring"
oOracleConn.Open()



Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espa駉l
Ven, y hablemos de ASP.NET...
======================

"达达" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> How to connect asp.net with Oracle Database?
> Where and How to? Thanks very much.
>
>



 
Reply With Quote
 
Cowboy \(Gregory A. Beamer\)
Guest
Posts: n/a
 
      04-19-2005
To answer your question I would say "yes", ODP.NET is better for working
with Oracle. The programming model is the same in most tasks and similar in
the rest and it is tuned to Oracle. There are a few instances where
OracleClient is better, due to having to work with both .NET and Java, but
it is generally neglegible. For the newest Oracle database (10g), I do not
believe you can use the OracleClient that ships with Visual Studio as the
Oracle internals have changed.

The code that Juan shared is very close to ODP.NET and you can download
samples of code for ODP.NET from the same site you download ODP.NET:
http://otn.oracle.com

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***********************************************
Think outside the box!
***********************************************
"Mikeda" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Thanks very much.
> But if i wanna use ODP.Net to connect with ASP.Net?
> Is it better then yours?
> Then I am beginner.Thank you.
>
> "Juan T. Llibre" <(E-Mail Removed)> ????
> news:#(E-Mail Removed)...
> Standard:
> "Data Source=MyOracleDB;Integrated Security=yes;"
> This one works only with Oracle 8i release 3 or later
>
> Specifying username and password:
> "Data Source=MyOracleDB;User Id=username;Password=passwd;Integrated
> Security=no;"
> This one works only with Oracle 8i release 3 or later
>
> Declare the OracleConnection:
>
> C#:
> using System.Data.OracleClient;
> OracleConnection oOracleConn = new OracleConnection();
> oOracleConn.ConnectionString = "my connectionstring";
> oOracleConn.Open();
>
> VB.NET:
> Imports System.Data.OracleClient
> Dim oOracleConn As OracleConnection = New OracleConnection()
> oOracleConn.ConnectionString = "my connectionstring"
> oOracleConn.Open()
>
>
>
> Juan T. Llibre
> ASP.NET MVP
> http://asp.net.do/foros/
> Foros de ASP.NET en Espa駉l
> Ven, y hablemos de ASP.NET...
> ======================
>
> "达达" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> How to connect asp.net with Oracle Database?
>> Where and How to? Thanks very much.
>>
>>

>
>



 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      04-19-2005
re:
> But if i wanna use ODP.Net to connect with ASP.Net?
> Is it better then yours?


Those *are* the connection strings for the
..NET Framework Data Provider for Oracle (ODP.NET).

You can download it at:
http://www.microsoft.com/downloads/d...displaylang=en

And learn a bit more about it at:
http://www.c-sharpcorner.com/Code/20.../ODP.NET02.asp

You could also use OleDb :

This one's from Microsoft :
"Provider=msdaora;Data Source=MyOracleDB;User Id=UserName;Password=asdasd;"

The following are from Oracle :

Standard Security:
"Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;User
Id=Username;Password=asdasd;"

Trusted Connection:
"Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;OSAuthent=1;"

Or, you could also use OraDirect : http://www.crlab.com/oranet/

OraDirect .NET supports Oracle 10g, 9i, 8i and 8.0,
including Personal and Lite editions.

Their provider works with .NET Framework 1.0, 1.1, and 2.0.
It will cost you $$$, though. ( $100 to $150 ).




Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espa駉l
Ven, y hablemos de ASP.NET...
======================

"Mikeda" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Thanks very much.
> But if i wanna use ODP.Net to connect with ASP.Net?
> Is it better then yours?
> Then I am beginner.Thank you.
>
> "Juan T. Llibre" <(E-Mail Removed)> ????
> news:#(E-Mail Removed)...
> Standard:
> "Data Source=MyOracleDB;Integrated Security=yes;"
> This one works only with Oracle 8i release 3 or later
>
> Specifying username and password:
> "Data Source=MyOracleDB;User Id=username;Password=passwd;Integrated
> Security=no;"
> This one works only with Oracle 8i release 3 or later
>
> Declare the OracleConnection:
>
> C#:
> using System.Data.OracleClient;
> OracleConnection oOracleConn = new OracleConnection();
> oOracleConn.ConnectionString = "my connectionstring";
> oOracleConn.Open();
>
> VB.NET:
> Imports System.Data.OracleClient
> Dim oOracleConn As OracleConnection = New OracleConnection()
> oOracleConn.ConnectionString = "my connectionstring"
> oOracleConn.Open()
>
>
>
> Juan T. Llibre
> ASP.NET MVP
> http://asp.net.do/foros/
> Foros de ASP.NET en Espa駉l
> Ven, y hablemos de ASP.NET...
> ======================
>
> "达达" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> How to connect asp.net with Oracle Database?
>> Where and How to? Thanks very much.
>>
>>

>
>



 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      04-19-2005
Thanks, Cowboy.

Here's some specific URLs for samples :

Simple:
http://www.oracle.com/technology/sam.../odpbasic.html

Advanced:
http://www.oracle.com/technology/sam...et/odpadv.html

XML:
http://www.oracle.com/technology/sam...204/index.html

How-To ( Tutorials ) :
http://www.oracle.com/technology/sam...wto/index.html



Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espa駉l
Ven, y hablemos de ASP.NET...
======================

"Cowboy (Gregory A. Beamer)" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
> To answer your question I would say "yes", ODP.NET is better for working
> with Oracle. The programming model is the same in most tasks and similar
> in the rest and it is tuned to Oracle. There are a few instances where
> OracleClient is better, due to having to work with both .NET and Java, but
> it is generally neglegible. For the newest Oracle database (10g), I do not
> believe you can use the OracleClient that ships with Visual Studio as the
> Oracle internals have changed.
>
> The code that Juan shared is very close to ODP.NET and you can download
> samples of code for ODP.NET from the same site you download ODP.NET:
> http://otn.oracle.com
>
> --
> Gregory A. Beamer
> MVP; MCP: +I, SE, SD, DBA
>
> ***********************************************
> Think outside the box!
> ***********************************************
> "Mikeda" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Thanks very much.
>> But if i wanna use ODP.Net to connect with ASP.Net?
>> Is it better then yours?
>> Then I am beginner.Thank you.
>>
>> "Juan T. Llibre" <(E-Mail Removed)> ????
>> news:#(E-Mail Removed)...
>> Standard:
>> "Data Source=MyOracleDB;Integrated Security=yes;"
>> This one works only with Oracle 8i release 3 or later
>>
>> Specifying username and password:
>> "Data Source=MyOracleDB;User Id=username;Password=passwd;Integrated
>> Security=no;"
>> This one works only with Oracle 8i release 3 or later
>>
>> Declare the OracleConnection:
>>
>> C#:
>> using System.Data.OracleClient;
>> OracleConnection oOracleConn = new OracleConnection();
>> oOracleConn.ConnectionString = "my connectionstring";
>> oOracleConn.Open();
>>
>> VB.NET:
>> Imports System.Data.OracleClient
>> Dim oOracleConn As OracleConnection = New OracleConnection()
>> oOracleConn.ConnectionString = "my connectionstring"
>> oOracleConn.Open()
>>
>>
>>
>> Juan T. Llibre
>> ASP.NET MVP
>> http://asp.net.do/foros/
>> Foros de ASP.NET en Espa駉l
>> Ven, y hablemos de ASP.NET...
>> ======================
>>
>> "达达" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> How to connect asp.net with Oracle Database?
>>> Where and How to? Thanks very much.
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Mikeda
Guest
Posts: n/a
 
      04-20-2005
Oh?Thanks very much~~I will try later..
"Cowboy (Gregory A. Beamer)" <(E-Mail Removed)> 写入消息
news:(E-Mail Removed)...
> To answer your question I would say "yes", ODP.NET is better for working
> with Oracle. The programming model is the same in most tasks and similar

in
> the rest and it is tuned to Oracle. There are a few instances where
> OracleClient is better, due to having to work with both .NET and Java, but
> it is generally neglegible. For the newest Oracle database (10g), I do not
> believe you can use the OracleClient that ships with Visual Studio as the
> Oracle internals have changed.
>
> The code that Juan shared is very close to ODP.NET and you can download
> samples of code for ODP.NET from the same site you download ODP.NET:
> http://otn.oracle.com
>
> --
> Gregory A. Beamer
> MVP; MCP: +I, SE, SD, DBA
>
> ***********************************************
> Think outside the box!
> ***********************************************
> "Mikeda" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Thanks very much.
> > But if i wanna use ODP.Net to connect with ASP.Net?
> > Is it better then yours?
> > Then I am beginner.Thank you.
> >
> > "Juan T. Llibre" <(E-Mail Removed)> ????
> > news:#(E-Mail Removed)...
> > Standard:
> > "Data Source=MyOracleDB;Integrated Security=yes;"
> > This one works only with Oracle 8i release 3 or later
> >
> > Specifying username and password:
> > "Data Source=MyOracleDB;User Id=username;Password=passwd;Integrated
> > Security=no;"
> > This one works only with Oracle 8i release 3 or later
> >
> > Declare the OracleConnection:
> >
> > C#:
> > using System.Data.OracleClient;
> > OracleConnection oOracleConn = new OracleConnection();
> > oOracleConn.ConnectionString = "my connectionstring";
> > oOracleConn.Open();
> >
> > VB.NET:
> > Imports System.Data.OracleClient
> > Dim oOracleConn As OracleConnection = New OracleConnection()
> > oOracleConn.ConnectionString = "my connectionstring"
> > oOracleConn.Open()
> >
> >
> >
> > Juan T. Llibre
> > ASP.NET MVP
> > http://asp.net.do/foros/
> > Foros de ASP.NET en Espa駉l
> > Ven, y hablemos de ASP.NET...
> > ======================
> >
> > "达达" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> >> How to connect asp.net with Oracle Database?
> >> Where and How to? Thanks very much.
> >>
> >>

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

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
install_driver(Oracle) failed: Can't load 'C:/Perl/site/lib/auto/DBD/Oracle/Oracle.dll' for module DBD::Oracle: load_file:The specified procedure could not be found at C:/Perl/lib/DynaLoader.pm line 230. Feyruz Perl Misc 4 10-14-2005 06:47 PM
Exception thrown while accessing Oracle through oracle client =?Utf-8?B?TmVv?= ASP .Net 2 07-12-2005 06:59 PM
Oracle adapter don't work with Oracle 10.1.0.2 v. Client vaidas gudas ASP .Net 1 10-11-2004 01:11 PM
RE: Oracle beginner problem: can't connect to Oracle using cx_Oracle Pieter Claerhout Python 0 01-28-2004 01:13 PM
Oracle beginner problem: can't connect to Oracle using cx_Oracle Benson, John Python 1 01-28-2004 12:55 PM



Advertisments