SQL SErver Connection Dot NET
SQL SErver Connection Dot NET
4. A green arrow on the icon next to the server name and on the toolbar
indicates that the server started successfully.
5. Now you can create your own database(ex. name it 'MyDatabaseName' ) .
<configuration>
<connectionStrings>
<remove name=”LocalSqlServer”/>
</connectionStrings>
</configuration>
Then In your .Net project on the code behind form use class
provided by microsoft for connection by :
import System.Data.SqlClient;
Then in your function write following lines to connect and use it:
string connectionString =
WebConfigurationManager.ConnectionStrings["MyConnectionString"].ConnectionString;
SqlConnection conn = new SqlConnection(connectionString);
conn.Open();
dta.SelectCommand = sqlSelect;
dta.Fill(ds, "PlanTransport");
if(conn.State != ConnectionState.Closed)
conn.Close();