Psst! Did you know DevelopmentNow is a mobile web site design agency?

Contact us for help mobilizing your site, or to sign up for our beta Mobile Web SDK!
all groups > dotnet ado.net > july 2003 >

dotnet ado.net : Connect to Database


Ralf La Porte
7/8/2003 4:00:35 AM
Hello!

What is the best way to connect to a Database (Ado.Net,
Odbc.Net). My prorgram must connect to different Databases
(for example: Oracle, xBase, SQL-Server). The connect to
the database differs from user to user.....

Thanks for your answer and bye

Jimmy [Used-Disks]
7/8/2003 8:35:43 AM
[quoted text, click to view]

I use a factory pattern to do this. To do this I read the connection string
from my App.config file then use that to determine the type of database the
connection string is for, I then use that information to create the proper
objects (for example SqlCommand & SqlConnection instead of OdbcCommand &
OracleConnection). To return the result, do as Javier suggested - use the
ADO.NET interfaces (IDbConnection, IDbCommand, etcetera).

[quoted text, click to view]

Javier Ros
7/8/2003 1:23:42 PM
hi Ralf,
AdoDotNet, of course, my programs connect to differents databases depends
of the day of week and with Ado.Net is easy.
I´m using differents .NET Data Providers but in the service level y work
with Interfaces (IDbConnection, IDbCommand, IDbTransaction, ...)

good lucking.

Javier Ros

"Ralf La Porte" <rlaporte@gmx.de> escribió en el mensaje
news:0db101c34540$2893e370$a101280a@phx.gbl...
[quoted text, click to view]

Javier Ros
7/8/2003 2:15:36 PM
if you have a money:

http://www.datadirect-technologies.com/products/dotnet/dotnetoverview.asp

other way is using OleDb .Net Data Provider with SyBase OLE DB Provider

..Javier Ros.

"Tim Wang" <tim.wang@gathink.com> escribió en el mensaje
news:u3ttUQURDHA.3144@tk2msftngp13.phx.gbl...
[quoted text, click to view]

Tim Wang
7/8/2003 7:28:47 PM
Hi Ros:
how to connect to sybase with ado.net£¿


"Javier Ros" <jros@NO$PAMHEREemuasa.es> дÈëÓʼþ
news:%23wbnoMURDHA.2424@tk2msftngp13.phx.gbl...
[quoted text, click to view]

AddThis Social Bookmark Button