scouse
11-16-2007, 05:15 AM
Hey,
I've got a check box like the following:
<input type="checkbox" name="activate_article" value="1">
I then retrieve this value from the form with this:
strActivate = DbInsert(request("activate_article"))
if strActivate = "" then
strActivate = 0
end if
and then enter it into the SQL database into a field that has a BIT field type. This works fine.
I then try to retireve this value later to check/uncheck the checkbox depending on whether the user had checked/unchecked it.
I use this to retrieve from the recordset:
activate_article = trim(RS("activate_article"))
I then try to check the value of "activate_article" to determine the state of the checkbox using this:
line 761: if activate_article = 1 then
line 762: article_check = "checked"
line 763: end if
BUT this brings up this error:
Microsoft VBScript runtime error '800a000d'
Type mismatch: '[string: "True"]'
Line 761
I've not really worked much with BIT values so might just be making a simple mistake.
Any help would be great
Cheers
I've got a check box like the following:
<input type="checkbox" name="activate_article" value="1">
I then retrieve this value from the form with this:
strActivate = DbInsert(request("activate_article"))
if strActivate = "" then
strActivate = 0
end if
and then enter it into the SQL database into a field that has a BIT field type. This works fine.
I then try to retireve this value later to check/uncheck the checkbox depending on whether the user had checked/unchecked it.
I use this to retrieve from the recordset:
activate_article = trim(RS("activate_article"))
I then try to check the value of "activate_article" to determine the state of the checkbox using this:
line 761: if activate_article = 1 then
line 762: article_check = "checked"
line 763: end if
BUT this brings up this error:
Microsoft VBScript runtime error '800a000d'
Type mismatch: '[string: "True"]'
Line 761
I've not really worked much with BIT values so might just be making a simple mistake.
Any help would be great
Cheers