Creating SQL Connections : SQL Server : ADO.Net C# Examples


C# Examples » ADO.Net » SQL Server »

 

Creating SQL Connections









    
using  System;
using  System.Data.SqlClient;

class  MainClass  
{
    static  void  Main(string[]  args)
    {
        SqlConnection  MyConnection  =  new  SqlConnection("Data  Source=(local);  Initial    Catalog  =  MyDatabase;  User  ID=sa;Password=");

        MyConnection.Open();
    }
}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo ADO.Net
» SQL Server