Closed Thread Icon

Topic awaiting preservation: Add checkbox value to MS Access file (ASP) (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=12993" title="Pages that link to Topic awaiting preservation: Add checkbox value to MS Access file (ASP) (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Add checkbox value to MS Access file (ASP) <span class="small">(Page 1 of 1)</span>\

 
Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 11-20-2003 04:13

Hi, guys. I am trying to update database file filed, which is checkbox.
In my database file, there are filed called Screw.
I am adding new product, which has sometimes screw.
So in my ASP file, I made textbox to enter some data about product. And there is a checkbox to see if it is screw or not. I am trying to pass that value to MS access database.
I did something like this:

code:
Star = Request.Form("Star")
If Not IsEmpty(Request.Form("Screw")) Then
Screw = "True"
Else
Screw = "False"
End If

''''''''''''''''''''''''''''''''''
'SQL statement to add new product.
'But Screw is checkbox filed in msdb.
'''''''''''''''''''''''''''''''''''

sql = "INSERT INTO Wine_Winery (WineryID, WineID, Screw) VALUES"
sql = sql & "('"&WineryID&"','"&WineID&"', '"&Screw&"')"



Hmm.....I am not certain about how to add checkbox value to database itself.
Please help.

Hiroki Kozai

Rhino
Bipolar (III) Inmate

From: New Jersey, USA
Insane since: Jul 2003

posted posted 11-20-2003 09:42

Try sending a 0 (zero) or a 1 (one) to the database. 1 is True, 0 is False.

Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 11-20-2003 20:51

Cheers, I will try that.


Hiroki Kozai

Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 11-21-2003 00:31

Many thanks.
It works fine!
Cheers,

Hiroki Kozai

« BackwardsOnwards »

Show Forum Drop Down Menu