Results 1 to 2 of 2

Thread: [RESOLVED] can't connect to sql server...

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,168

    Resolved [RESOLVED] can't connect to sql server...

    I registered for an SQL server at this website:

    www.freesqlserver.com

    I tried connecting by:

    Code:
                string conStr = "Data Source=www.freesqlserver.com;Initial Catalog=mytable;UserId=john1;Password=pass1;";//not actual user-pass
    
                System.Data.SqlClient.SqlConnection con = new System.Data.SqlClient.SqlConnection(conStr); //error here
                System.Data.SqlClient.SqlCommand cmd;
                cmd = new System.Data.SqlClient.SqlCommand("Select * from mytable", con);
                con.Open();
                cmd.ExecuteNonQuery();
                con.Close();
    I get an error message saying (Keyword not supported: 'userid'.) . i'm not that familiar with sql, i've usually worked with ms access. Any idea how to connect to sql servers?

  2. #2

    Thread Starter
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,168

    Re: [RESOLVED] can't connect to sql server...

    just had to change to UID and PWD

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width