check the textbox field to database table field
how to check the text box value to database table field ,i want to enter the name in textbox ,the name is already exist means it give the msgbox "the name is already exist"...i using vb.net back end MSAccess2003.....plz give ur valuable ans thank u
Koteswararao MallisettiPosted Mar 29, 2011, 3:05 AM
cmdText="select count(*) from table_Name where Column_Name = ' "+textBox_Name.Text+"''";
once you call the executeScalr Method it will give the 0 if the no row exists with the textBox Value
if the value is matched it return 1 means the row is exists with that value ,in this situation you show the message box
Suthish NairPosted Apr 4, 2011, 10:54 AM
guna sakthiPosted Apr 4, 2011, 6:16 AM