|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Store CheckBox value on database
1. How can I store a database value on a SQL database's table??
I have 6 checboxes and I need to store if they are checked or not, just that... Is ther any kind of var like Access' Yes/No value? 2. Do you know where can I find any example about storing an image in the same database? Thanks... |
|
#2
|
|||
|
|||
|
I usually use the "bit" value - which is "1" for yes and "0" for no. In Access they are usually Boolean, which is "-1" for yes and "0" for no. If you are transferring data over it might make sense to change the Access value from Boolean to text - I think that's what switches it to a positive 1.
Sorry, don't know anything about images. |
|
#3
|
|||
|
|||
|
I generally use bit for SQL for a 1/0 type flag. Although thats just me. You could also use char, varchar, or a number data type if you are so inclined.
As far as images go, I never, ever save images in the actual SQL database. You have a lot more control over the image files, easy accessibility, so on and so forth, if you save them on your filesystem (i.e. a folder on your hard drive or network resource). Storing images in SQL requires a fair amount of coding unless you buy or download some utilities to help the process along (I could be wrong on the amount of coding, but last time I tried it was a lot). |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Store CheckBox value on database |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|