Saturday, April 20, 2013

Database Connection


Connection of Data Bases ( SQL VS ACCESS )



SQL .NET Data Provider 

Using System.Data;
Using System.Data.SqlClient 

OLE DB .NET Data Provider 

Using System.Data;
Using System.Data.OleDb;


SQL .NET Data Provider 

SqlConnection sqlcon = new SqlConnection ("server=SQLDB; uid=sa; pwd=password; database=pubs");

OLE DB .NET Data Provider

OleDbConnection adocon=new OleDbConnection ( @ " provider=Microsoft.jet.Oledb.4.0; data source=D:\OOP Progs\MasterDemo\MasterDemo\bin\Bahria.mdb " ) ;

No comments:

Post a Comment