Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Databases
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 27th, 2005, 10:14 AM
Registered User
 
Join Date: Apr 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default updating yes/no field in MS Access database

Hello,

My problem is about 3 checkboxes that I want to link to 3 yes/no fields in my database.
 I want to update some information and when I check/uncheck the checkbox in my ASP page I want to check/uncheck the yes/no fields.
This is the code that I am using:
Code:
IF Request.Form ("chksNeeds?.checked") = true THEN
    if RS.Fields ("sNeeds?") = false then
        RS ("sNeeds?") = true
    end if
ELSE
    if RS.Fields ("sNeeds?") = true then
        RS ("sNeeds?") = false
    end if
END IF
It only works only once and only if the field in the database is set to TRUE. I know that unchecked checkboxes are not passed to the server...(I did a little research), but still don't have any clue on how to fix this problem!

  Does anybody have any ideea on how to get this thing working?

 Regards,

Reply With Quote
  #2 (permalink)  
Old April 29th, 2005, 06:36 AM
Authorized User
 
Join Date: Jul 2004
Location: Hyderabad, Andhra Pradesh, India.
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to raj_makro
Default

Hi
  Try the following
 IF Request.Form ("chksNeeds?") = "on" THEN
inplace of
 IF Request.Form ("chksNeeds?.checked") = true THEN

Regards
Raj


Regards
Raj
Reply With Quote
  #3 (permalink)  
Old May 6th, 2005, 11:04 AM
Registered User
 
Join Date: May 2005
Location: , Kansas, .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Possibly you could use form fields or drop down menus that when selected = a number. That way in your db it will always have a "yes" or "no" value based on the number assigned...
EG: Yes="-1"
No = 1

Then write a bit that says If the fiels is -1 then check yes, if field is 1 then check no.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem Updating MS Access database javlet Java Databases 1 April 24th, 2007 07:16 AM
Database migration MS Access 2003 to MS SQL 2000 ayazhoda SQL Server 2000 3 April 23rd, 2007 11:38 AM
MS ACCESS UPDATING A SUBFORM FIELD bernieregans SQL Language 1 February 3rd, 2006 04:26 PM
MS Access Field Name itHighway Classic ASP Basics 3 February 22nd, 2005 12:25 AM
Accessing AutoNumber field of MS Access Using ASP MuthuAL Classic ASP Databases 1 January 22nd, 2005 11:30 AM



All times are GMT -4. The time now is 07:33 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.