Building SQL Connection in C#.Net 2005

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • klaydze
    New Member
    • Mar 2007
    • 30

    Building SQL Connection in C#.Net 2005

    hi, i am a VB.Net user and i want to try C#.Net 2005. i'm converting some of my project done in vb.net to c#.net but i dont know how to start working in sql server 2000. is there someone who can help me building a Sql Connection in C#.Net and im using SQL Server 2000.

    Thank You.
  • saikatkolkata
    New Member
    • Jan 2008
    • 17

    #2
    here is a code for connecting to a sql server:

    SqlConnection conn = new SqlConnection(@ "Data Source=.\SQLEXP RESS;AttachDbFi lename=C:\Home Project\Home_pr oj_1\Home_proj_ 1\Directory.mdf ;Integrated Security=True;U ser Instance=True") ;

    this is just a simple code for connecting to a local database..try it

    hope it help~

    Comment

    Working...