fozail
05-22-2006, 01:25 AM
Hi, I have a data entry form with a couple of text boxes that do not require entry.I'm storing the values of these fields in two 'bigint' fields of SQL server database.Now, If the user does not enter any values and hits submit.I get an error that input data is not in correct form.I have tried to use Convert.int64() function and I still get an error.What should I do.Please help!
sirpelidor
05-23-2006, 01:27 AM
Hi,
You can't use Convert.To(whatever) when you have a empty string. Am I safe to assume you allow Null on ur sql table?
If so, what you can do is put a regularExpressionValidator, and a rangeValidator for your text boxe, just to make sure the input is numerical value and is greater then whatever....
That way, you can directly write whatever you have from your text box to sql, if it is a numerical value, it will recongize as BigInt. If it is empy string, it will auto replace with NULL value.