Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft SQL Server

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old May 21st, 2003, 12:12 PM
amit_palrecha amit_palrecha is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 1 amit_palrecha User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Add data from checkboxes to Access database

I have a column in Access table which accepts Yes/No values. Now on the web page, when the user checks the check box the same has to be entered into the table column accepting the Yes/No values. How do I do it?<br><br><br><br> Thank in advance. <img border="0" src="/forum/emoticons/smilewinkgrin.gif" height="15" width="15" alt="smilewinkgrin" />

Reply With Quote
  #2  
Old May 30th, 2003, 05:21 PM
dcarva's Avatar
dcarva dcarva is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: Jan 2003
Location: USA
Posts: 633 dcarva User rank is Lance Corporal (50 - 100 Reputation Level)dcarva User rank is Lance Corporal (50 - 100 Reputation Level)dcarva User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 9 h 18 m 20 sec
Reputation Power: 6
If the checkbox name is chk1, for example:<br><br>if Request.Form("chk1") = "ON" Then<br> '....SQL to set the column to true<br>else<br> '...SQL set the column to false<br>endif<br><br>Your SQL string would be something like this: <br><br>UPDATE Table1 <br>SET column1 = true<br>WHERE somecolumn = 'somevalue'<br><br>Here is a good example on this site: http://www.aspfree.com/authors/adrian/MultipleCheckboxes.asp

Reply With Quote
  #3  
Old February 16th, 2005, 07:31 AM
WebGuyX WebGuyX is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 2 WebGuyX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 47 sec
Reputation Power: 0
Re:

Another way I use to manipulate the Yes/No Access field is to add it using straight numbers.
Example: INSERT INTO tblTable(chkBox1fld, chkBox2fld) VALUES ( 0, 1)
This SQL would set chkBox1fld to false and chkBox2fld to true.
This has been tested and worked for Access databases. I think adding a value of -1 is the equivalent of a NULL but I cannot confirm it.

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft SQL Server > Add data from checkboxes to Access database


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT