Hello guys
I am selecting a record from a database with this statements:
BindingSource personalDetailsBindingSource = new BindingSource();
personalDetailsBindingSource.DataSource = GetData("Select * From PersonalDetails where FirstName="+textBox1.Text);
DataGridView2.DataSource = personalDetailsBindingSource;
in the sql statement the where clause is not working at all. If i remove the where clause I get the result of that but with the where clause I get an error.
kindly help,
Thanks in advance

VulpesRank #55 · 29.2K reputationPosted Mar 14, 2013, 2:04 AM EDT
personalDetailsBindingSource.DataSource = GetData("Select * From PersonalDetails where FirstName='"+ textBox1.Text + "'");
Imtiyaz AnsariRank #1,031 · 1.9K reputationPosted Mar 14, 2013, 12:20 PM EDT
HI
character value where condition :- ' " + TxtName.text + " '
numeric value :- " + Txtid.text + "