swofford
03-16-2006, 02:13 PM
Hi all,
My client has an Access database where the value of a checkbox is stored in a field called Exclude_PropCount as -1 or 0. I am trying to get this form working online, but have been unable to successfully store this value in the db. I have set up a simple page to test it, and my relevant code is this:
sql_save = "INSERT INTO HVM_Data (VC, Exclude_PropCount) VALUES ('a9', '-1')"
con.Execute sql_save
set duplicateVC1 = db.Execute("SELECT Exclude_PropCount FROM HVM_Data WHERE VC = 'a9'")
response.write duplicateVC1("Exclude_PropCount")
But no matter whether I have '-1' or '0' in the INSERT statement, the response.write line always returns "False". And of course I've tried inserting "true" and "false", but it only accepts an integer.
As exceptionally bad timing would have it, my server is slightly fubar and I can't download the database to my PC to see what's actually being stored there, but looking at the above code, do you see anything I'm doing inherently *wrong*? This is my first time with checkboxes so I won't be surprised if that's the case. Hints?
I should add that I do have an older copy of the db on my desktop, and there is already a record that does have '-1' in the Exclude_PropCount field, and it *does* return "True". So when I do:
set duplicateVC2 = db.Execute("SELECT Exclude_PropCount FROM HVM_Data WHERE VC = 'HKX'")
response.write duplicateVC2("Exclude_PropCount")
Then the response.write returns "True". All other records have zeroes and return "False". I just can't download the updated db to see what value is going in for VC='a9'. My suspicion is that someone less tired than I could look at my code and show me where I'm being a dummy.
Thanks!
My client has an Access database where the value of a checkbox is stored in a field called Exclude_PropCount as -1 or 0. I am trying to get this form working online, but have been unable to successfully store this value in the db. I have set up a simple page to test it, and my relevant code is this:
sql_save = "INSERT INTO HVM_Data (VC, Exclude_PropCount) VALUES ('a9', '-1')"
con.Execute sql_save
set duplicateVC1 = db.Execute("SELECT Exclude_PropCount FROM HVM_Data WHERE VC = 'a9'")
response.write duplicateVC1("Exclude_PropCount")
But no matter whether I have '-1' or '0' in the INSERT statement, the response.write line always returns "False". And of course I've tried inserting "true" and "false", but it only accepts an integer.
As exceptionally bad timing would have it, my server is slightly fubar and I can't download the database to my PC to see what's actually being stored there, but looking at the above code, do you see anything I'm doing inherently *wrong*? This is my first time with checkboxes so I won't be surprised if that's the case. Hints?
I should add that I do have an older copy of the db on my desktop, and there is already a record that does have '-1' in the Exclude_PropCount field, and it *does* return "True". So when I do:
set duplicateVC2 = db.Execute("SELECT Exclude_PropCount FROM HVM_Data WHERE VC = 'HKX'")
response.write duplicateVC2("Exclude_PropCount")
Then the response.write returns "True". All other records have zeroes and return "False". I just can't download the updated db to see what value is going in for VC='a9'. My suspicion is that someone less tired than I could look at my code and show me where I'm being a dummy.
Thanks!