navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Check boxes again....

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Check boxes again....
Page: [1]
 
Wendy P

 

Posts: 17
From: Timmins, Ontario, Canada
Status: offline

 
Check boxes again.... - 6/21/2001 16:52:00   
Thanks for the assistance on my last checkbox question....however the saga continues.

I am now trying to update a database. One of the fields is a check box. I have no problem when the check box is marked "on" or "yes" or "1" or "true" or whatever else is the positive answer, but as soon as the check box is turned off, I get the following error when I run the update query:

Database Results Error
Description: [Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement.
Number: -2147217900 (0x80040E14)
Source: Microsoft OLE DB Provider for ODBC Drivers

One or more form fields were empty. You should provide default values for all form fields that are used in the query.

Any ideas on how to deal with this? I assume the problem is caused because the checkbox field is going to the query as "" (null), but how do you work around this?

Most greatful for any guidance.

Wendy

Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Check boxes again.... - 6/22/2001 20:27:00   
DRW or ASP?
In ASP you can check for nulls, in the DRW supply a default at step 3 should be sufficient?

------------------
§þððk¥
"I am Spooky of Borg. Prepare to be assimilated, babycakes!"
Subscribe to OutFront News
Database / DRW Q & A
The Spooky Login!
VP-ASP Shopping cart


(in reply to Wendy P)
Wendy P

 

Posts: 17
From: Timmins, Ontario, Canada
Status: offline

 
RE: Check boxes again.... - 6/22/2001 20:12:00   
Thanks again spooky...I think I was over complicating things when I was trying to solve this one.....can you say b-r-a-i-n d-a-m-a-g-e :-)

(in reply to Wendy P)
d00nson

 

Posts: 142
From: Australia
Status: offline

 
RE: Check boxes again.... - 12/13/2001 4:48:43   
Spooky,
I know this one's a bit old but I have been traipsing the forums looking for a solution. You'll see me in Sarge's post as well http://66.155.126.102/topic.asp?TOPIC_ID=9446 I noticed u said that you can use ASP to do a check for null values, since my code is on a diet, can you elaborate on the ASP solution? does it involve some inline ASP code that says "if checkbox value = null (ie user unchecked it from a checked state) pass a value of 0" instead? I assume that if the checkbox was unchecked and user checks it, it would by default send -1 (checked) and I wouldn't need to test for the condition? TIA!!

(in reply to Wendy P)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Check boxes again....
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts