Connection string for oledb and sql

First case:oledb
OleDbConnection conn;
Conn.connectionstring=”microsoft.Jet.Oledb.4.0;data source=test.mdb;Persist Security Info=false”;
Second case:
SqlConnection conn;
Con.connenctstring=”datasource=servername;initial catalog=databasename;user id=username;pwd=password;”;

你可能感兴趣的:(Connection)