Saturday, July 01, 2006

Connection Strings

These connection strings are for .NET programming environment which can be connected to a wide variety of database. Below are some of most common connection strings

MSSQL Server
  • SQLServer
    "Data Source=MSSQLServerName;Initial Catalog=Northwind;User Id=id;Password=password;"
  • OleDbServer
    "Provider=sqloledb;Data Source=MSSQLServerName;Initial Catalog=Northwind;User Id=id;Password=password;"
MS Access
  • Standard
    "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;User Id=admin;Password=;"

  • With Password
    "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;Jet OLEDB:Database Password=MyDbPassword;
Oracle
  • ODBC
    "Driver={Microsoft ODBC for Oracle}; Server=OracleServer.world; Uid=Username;Pwd=password;"
  • OLE DB
    "Data Source=MyOracleDB;User Id=username;Password=passwd;Integrated Security=no;"
MySQL
  • OLE DB
    "Provider=MySQLProv;Data Source=mydb;User Id=UserName;Password=asdasd;"

No comments:

Post a Comment