Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-04-2002, 12:16 PM   PM User | #1
krnaveen
New Coder

 
Join Date: Jun 2002
Location: Delhi, India
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
krnaveen is an unknown quantity at this point
Still Clueless ????

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.
krnaveen is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:21 AM.


Advertisement
Log in to turn off these ads.