Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Just a standard connection from C# here, this works with a small amount of data but not a large set. Do I have the syntax wrong??

 

Thanks, Tim

 

SqlConnection mySqlConnection = new SqlConnection();

 

string strConn = "";

 

strConn = "Data Source=" + this.textBoxInstance.Text + ";" ;

strConn += "DataBase= " + this.textBoxDBName.Text + ";" ;

//strConn += " Integrated Security=SSPI ;" ;

strConn += "User ID = sa;" ;

strConn += " connection timeout = 10000000;" ; //connection timeout

 

mySqlConnection.ConnectionString = strConn;

SqlCommand cmd = mySqlConnection.CreateCommand();

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...