By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,876 Members | 1,206 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,876 IT Pros & Developers. It's quick & easy.

How to connect ASP.Net with Oracle Database?

P: n/a
How to connect asp.net with Oracle Database?
Where and How to? Thanks very much.
Nov 19 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
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...
======================

"达达" <mi********@163.com> wrote in message news:O3**************@TK2MSFTNGP09.phx.gbl...
How to connect asp.net with Oracle Database?
Where and How to? Thanks very much.

Nov 19 '05 #2

P: n/a
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" <no***********@nowhere.com> ????
news:#0**************@TK2MSFTNGP15.phx.gbl...
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...
======================

"达达" <mi********@163.com> wrote in message
news:O3**************@TK2MSFTNGP09.phx.gbl...
How to connect asp.net with Oracle Database?
Where and How to? Thanks very much.

Nov 19 '05 #3

P: n/a
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" <mi********@163.com> wrote in message
news:uj**************@TK2MSFTNGP15.phx.gbl...
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" <no***********@nowhere.com> ????
news:#0**************@TK2MSFTNGP15.phx.gbl...
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...
======================

"达达" <mi********@163.com> wrote in message
news:O3**************@TK2MSFTNGP09.phx.gbl...
How to connect asp.net with Oracle Database?
Where and How to? Thanks very much.


Nov 19 '05 #4

P: n/a
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" <mi********@163.com> wrote in message
news:uj**************@TK2MSFTNGP15.phx.gbl... 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" <no***********@nowhere.com> ????
news:#0**************@TK2MSFTNGP15.phx.gbl...
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...
======================

"达达" <mi********@163.com> wrote in message
news:O3**************@TK2MSFTNGP09.phx.gbl...
How to connect asp.net with Oracle Database?
Where and How to? Thanks very much.


Nov 19 '05 #5

P: n/a
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)" <No*************@comcast.netNoOSpamM> wrote in
message news:uu**************@TK2MSFTNGP12.phx.gbl...
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" <mi********@163.com> wrote in message
news:uj**************@TK2MSFTNGP15.phx.gbl...
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" <no***********@nowhere.com> ????
news:#0**************@TK2MSFTNGP15.phx.gbl...
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...
======================

"达达" <mi********@163.com> wrote in message
news:O3**************@TK2MSFTNGP09.phx.gbl...
How to connect asp.net with Oracle Database?
Where and How to? Thanks very much.



Nov 19 '05 #6

P: n/a
Oh?Thanks very much~~I will try later..
"Cowboy (Gregory A. Beamer)" <No*************@comcast.netNoOSpamM> 写入消息
news:uu**************@TK2MSFTNGP12.phx.gbl...
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" <mi********@163.com> wrote in message
news:uj**************@TK2MSFTNGP15.phx.gbl...
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" <no***********@nowhere.com> ????
news:#0**************@TK2MSFTNGP15.phx.gbl...
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...
======================

"达达" <mi********@163.com> wrote in message
news:O3**************@TK2MSFTNGP09.phx.gbl...
How to connect asp.net with Oracle Database?
Where and How to? Thanks very much.



Nov 19 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.