Hi all
I have a checkbox and input will save into database in BIT (0, 1)
This is a code i use to retrieve data from database:
<input type="checkbox" name="pnew" value="<% =pnew %>" <% if (pnew) then response.write ("Checked") %>>NEW?
This is what I've been think of:
If pnew = True Then
pnew = 1
Else
pnew = 0
End If
What I want is to convert to 1 if CHECKED and 0 if UNCHECKED. So far, either nothing changes or ERROR:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'False'.
Could someone tell me how to make it works?
I have a checkbox and input will save into database in BIT (0, 1)
This is a code i use to retrieve data from database:
<input type="checkbox" name="pnew" value="<% =pnew %>" <% if (pnew) then response.write ("Checked") %>>NEW?
This is what I've been think of:
If pnew = True Then
pnew = 1
Else
pnew = 0
End If
What I want is to convert to 1 if CHECKED and 0 if UNCHECKED. So far, either nothing changes or ERROR:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'False'.
Could someone tell me how to make it works?