Shops loading error
#1


MySqlConnectionStringBuilder mySqlConnectionStringBuilder = new MySqlConnectionStringBuilder();
mySqlConnectionStringBuilder.Server = this.textBox_host.Text;
mySqlConnectionStringBuilder.UserID = this.textBox_user.Text;
mySqlConnectionStringBuilder.Database = this.textBox_db.Text;
mySqlConnectionStringBuilder.Password = this.textBox_password.Text;
MySqlConnection mySqlConnection = new MySqlConnection(mySqlConnectionStringBuilder.ConnectionString);
MySqlConnection mySqlConnection2 = new MySqlConnection(mySqlConnectionStringBuilder.ConnectionString);
mySqlConnection2.Open();
MySqlCommand mySqlCommand = new MySqlCommand();
mySqlCommand.Connection = mySqlConnection;

{
try
{
mySqlConnection.Open();
MySqlCommand MySqlCommand = new MySqlCommand();
MySqlCommand.Connection = mySqlConnection;
string text = this.Shops.SelectedItem.ToString();
MySqlCommand.CommandText = string.Concat(new string[]
{
"select * from `",
textBox_db.Text,
"`.`t_shop` where a_keeper_idx=",
text,
";"
});
this.Reader = MySqlCommand.ExecuteReader();
this.Reader.Read();
this.textBox_name.Text = this.Reader["a_keeper_idx"].ToString();
this.Reader.Dispose();
}
catch (MySqlException ex)
{
MessageBox.Show("Error:\n" + ex.Message);
}
finally
{
if (this.Reader != null)
{
this.Reader.Dispose();
}
if (mySqlConnection != null)
{
mySqlConnection.Close();
mySqlConnection.Dispose();
}
}
}

My Code. I want if i click on this name that this displays on the textBox_name. How i can do that? Hope of help

 

Regards Jaiz



Messages In This Thread
[No subject] - by Jaiz - 07-28-2013, 10:48 AM
[No subject] - by someone - 07-28-2013, 11:38 AM
[No subject] - by Jaiz - 07-28-2013, 12:06 PM
[No subject] - by soryjero - 07-28-2013, 12:13 PM
[No subject] - by someone - 07-28-2013, 12:21 PM
[No subject] - by Jaiz - 07-28-2013, 12:25 PM
[No subject] - by Jaiz - 07-28-2013, 12:58 PM
[No subject] - by someone - 07-28-2013, 03:01 PM
[No subject] - by Jaiz - 07-28-2013, 04:41 PM
[No subject] - by someone - 07-28-2013, 05:07 PM
[No subject] - by Jaiz - 07-28-2013, 05:35 PM
[No subject] - by someone - 07-29-2013, 04:40 PM
[No subject] - by Jaiz - 07-29-2013, 04:52 PM
[No subject] - by soryjero - 07-29-2013, 10:26 PM
[No subject] - by Jaiz - 07-30-2013, 06:43 PM
[No subject] - by soryjero - 07-30-2013, 10:34 PM
[No subject] - by Jaiz - 07-31-2013, 01:01 PM
[No subject] - by soryjero - 07-31-2013, 09:59 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)