You can connect to a Local database named MyLocalData.mdf by using the following connection string: : SqlServer « ADO.net Database « ASP.NET Tutorial






Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|MyLocalData.mdf;
Integrated Security=True;User Instance=True








18.42.SqlServer
18.42.1.Connect to SQL server with integrated Authentication or SQL Authentication
18.42.2.Execute delete command with SqlCommand against SqlServer
18.42.3.You can connect to a Local database named MyLocalData.mdf by using the following connection string:
18.42.4.For example, the following connection string enables you to connect to a Server database named MyData:
18.42.5.You use SQLCMD by opening a command prompt and connecting to your database with the following command:
18.42.6.Read data from SQL server and fill asp:dropdownlist (C#)
18.42.7.Handle table relationship (C#)
18.42.8.Insert, update and delete (C#)