Click here to Skip to main content
16,017,857 members

Comments by Tunacha (Top 13 by date)

Tunacha 29-Oct-10 13:33pm View    
do u think it could possibly be the name variable?
Tunacha 29-Oct-10 13:17pm View    
i have tried that way aswell and it doesnt seem to pull anything but when i put an actual name in the query it works fine
Tunacha 29-Oct-10 3:17am View    
umm that i=did it work, did i maybe not define the name variable correctly?
Tunacha 27-Oct-10 2:25am View    
Okay well this is what i have tried so far

<pre> private void cbxnames_SelectedIndexChanged(object sender, EventArgs e)
{
string id;
id = cbxnames.ValueMember;
myConnection.GetConnection();
MySqlCommand txtfill = new MySqlCommand("SELECT * FROM users WHERE ID = '"+id+"'", myConnection.GetConnection());
txtfill.ExecuteNonQuery();
MySqlDataReader myReader = txtfill.ExecuteReader();
while (myReader.Read() != false)
{
string name = myReader.GetString("name").ToString();
uname.Text = name;
}


</pre>

But im having no luck with this, could anyone help
Tunacha 21-Oct-10 12:10pm View    
i keep getting No rows at point 0 on
this.Usernametxtbox.Text = DS.Tables[0].Rows[0]["name"].ToString();
and i dont know why