SqlServer: stringconnectionserver32.1.1.48; database name; usersa; passwordsa2008; access2007: Password-less connection string stringconStrProviderMicrosoft. Ace. OleDb.12.0; DataSourceE: 111. accdb; PersistSecurityInfoFalse;
SqlServer: string connection = "server = 32.1.1.48; database = database name; user = sa; password = sa2008"; access 2007: // stringconStr = "Provider = Microsoft. ace. oleDb.12.0; Data Source = E: // 111. accdb; Persist Security Info = False "; // Yes
SqlServer: string connection = "server = 32.1.1.48; database =DatabaseName; user = sa; password = sa2008 ";
Access 2007:
// Password-free connectionString
String conStr = "Provider = Microsoft. Ace. OleDb.12.0; Data Source = E: // 111. accdb; Persist Security Info = False ";
// Password-based connectionString
String conStr = "Provider = Microsoft. Ace. OleDb.12.0; Data Source = E: // 111. accdb; Jet OleDb: DataBase Password = 111 ";
Access 2003
// Password-free connectionString
String conStr = "Provider = Microsoft. Jet. OleDb.4.0; Data Source = E: // 111.mdb; Persist Security Info = False ";
// Password-based connectionString
String conStr = "Provider = Microsoft. Jet. OleDb.4.0; Data Source = E: // 111.mdb; Jet OleDb: DataBase Password = 111 ";
Link accessDatabaseIfUnable to start application workgroup information file lossIt may be a link.StringThe link is incorrect.
Sqlite:
String conStr = "Data Source = E: // 111.db; Password = 111 ";
When using SQLite, you need to add a reference System. Data. SQLite, C # will promptA mixed-mode assembly is generated for the runtime of "v2.0.50727". Without other information configured, the Assembly cannot be loaded at the 4.0 runtime,To solve this problem, add a configuration section in app. config:Startup