#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    33
    Rep Power
    12

    Microsoft SQL Server Connection ?


    Hi

    iam new into MS SQL Server. I wanted to connect via Visual Studio NET C++ to the MS SQL Server. I got experience php and mysql but none in c++.

    anyone can help me with code or links or tutorial ?

    thx
    Indian
  2. #2
  3. Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Location
    Edwardsville, IL
    Posts
    5
    Rep Power
    0

    SQLConnection


    Check out the SQLConnection Class.

    Here is the syntax for C#:

    public void CreateSqlConnection()
    {
    string myConnectString = "user id=sa;password=Jx$442pt;initial catalog=northwind;data source=mySQLServer;Connect Timeout=30";
    SqlConnection myConnection = new SqlConnection(myConnectString);
    myConnection.Open();
    }

    Hope this helps.

IMN logo majestic logo threadwatch logo seochat tools logo