Hi Friends,
Thanks for your help so far. I have been able to come out with my problems so far but one is still eluding me. I explain my problem as such:-
I have an HTML form containing ten elements (say 10 text boxes). When this form is submitted, it calls an ASP page which retrieves the values from these elements and inserts it into a database through an INSERT statement. The user has the option of filling in the information in any of these elements but he also can leave it blank. Now, for the blank elements I have to pass NULL corresponding to those variables in the insert statement. How do I do that ? I have tried using Javascript which checks for the blank elements and tries to assign NULL value to it, but in vain. It gives an error in the insert statement when the ASP page is called. The error reads as --
Microsoft OLE DB Provider for SQL Server error '80040e14'
Line 1: Incorrect syntax near ','.
/jewel/stock_items_data.asp, line 34
where, line 34 contains the execute statement, viz con.execute mysql. The data types of the fields in the database are of types char, int, money, float etc. The same code works fine when all the elements of the form has the value. Kindly bail me out. Thanks a lot.
-Navin.
Thanks for your help so far. I have been able to come out with my problems so far but one is still eluding me. I explain my problem as such:-
I have an HTML form containing ten elements (say 10 text boxes). When this form is submitted, it calls an ASP page which retrieves the values from these elements and inserts it into a database through an INSERT statement. The user has the option of filling in the information in any of these elements but he also can leave it blank. Now, for the blank elements I have to pass NULL corresponding to those variables in the insert statement. How do I do that ? I have tried using Javascript which checks for the blank elements and tries to assign NULL value to it, but in vain. It gives an error in the insert statement when the ASP page is called. The error reads as --
Microsoft OLE DB Provider for SQL Server error '80040e14'
Line 1: Incorrect syntax near ','.
/jewel/stock_items_data.asp, line 34
where, line 34 contains the execute statement, viz con.execute mysql. The data types of the fields in the database are of types char, int, money, float etc. The same code works fine when all the elements of the form has the value. Kindly bail me out. Thanks a lot.
-Navin.