I have a insertion statement that will insert the values from text boxes. It working fine now i want to check the text box must not be empty by using sql query.
My insertion statement is like this:
INSERT INTO guestpasstypes(guestPasstype_Name)values('" + tbPassType.Text + "')"
I also agree that you should avoid calling that SQL, due to the potential for injection attacks, but if for some reason, your really need to do it, then this should do the trick: