Index
- SQL Server
- MSSQL LocalDB
- MySQL
- SQLite
- Log
SQL Server
<add name="DefaultConnection" connectionString="Data Source=127.0.0.1;Initial Catalog=[YourDBName];Integrated Security=True" providerName="System.Data.SqlClient" />
Data Source=[ServerName];Initial Catalog=[DBName];User Id=[UserID];Password=[Password];
Data Source=192.168.0.1,1433;Network Library=DBMSSOCN;Initial Catalog=[YourDBName];User ID=[YourUserName];Password=[YourPassword];
Data Source=myServerAddress;Initial Catalog=[DBName];Integrated Security=SSPI;
Data Source=127.0.0.1;Initial Catalog=[DBName];Integrated Security=True
<add name="DefaultConnection" connectionString="Data Source=127.0.0.1;Initial Catalog=DBAspNet1;Integrated Security=True" providerName="System.Data.SqlClient" />
MSSQL LocalDB
<add name="DefaultConnection" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\aspnet-WebBase1Auth-20180924123716.mdf;Initial Catalog=[YourDBName];Integrated Security=True" providerName="System.Data.SqlClient" />
<add name="DefaultConnection" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\aspnet-WebBase1Auth-20180924123716.mdf;Initial Catalog=aspnet-WebBase1Auth-20180924123716;Integrated Security=True" providerName="System.Data.SqlClient" />
MySQL
SQLite
sqlite_conn = new SQLiteConnection("Data Source=C:\SQLITEDATABASES\SQLITEDB1.sqlite;Version=3;");
<connectionStrings>
<add name="PROD" connectionString="data source=app.db;" providerName="System.Data.SQLite"/>
</connectionStrings>
App_Data:
<add name="ConnectionString" connectionString="Data Source=|DataDirectory|\MyDb.sqlite;......" />
The |DataDirectory| token would expand to an App_Data folder under the root of a web application.
Log
20190311, 011netservice@gmail.com, Create.
20191022, Honda, Add SQLite
20191028, Honda, Add SQLite in App_Data for web.
20191124, Honda, Fix typo 127.0.01 to 127.0.0.1
20200115, Honda, Add MySQL.