frida Posted February 17, 2004 Posted February 17, 2004 hi, i want to read data form my database: string SelectQuery="SELECT * FROM datos2 WHERE (numero='"+this.valor+"')"; and i want to put the data in textboxs, i did this: if(myreader.Read()) { this.textBox1.Text=myreader("nombre"); this.comboBox1.Text=myreader("depto"); } but i have some errors like: 'myreader' denotes a variable where a metod was expected and i don't know what is the problem, could you help me? please!!! sorry, my english isn't good... thanks Quote
HJB417 Posted February 18, 2004 Posted February 18, 2004 truy changing this.textBox1.Text=myreader("nombre"); this.comboBox1.Text=myreader("depto"); to this.textBox1.Text=myreader["nombre"].ToString(); this.comboBox1.Text=myreader["depto"].ToString(); Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.