Hello ASP experts -
I have some checkboxes on my input form (ASP)
When I get to the ASP that performs the INSERT
to write the record, the boolean values for the checkboxes are correct... they are ON or OFF
correctly. But the INSERT statement fails with the error mentioned below.
What is the correct syntax to write the value to
the bit fields?
Thankyou. John
*** The Error *****
Microsoft OLE DB Provider for SQL Server error '80040e07'
Syntax error converting the varchar value ', ' to a column of data type bit.
*******************************
In the ASP where the error occurs:
<%
Dim blnNewWS
blnNewWS = Request.Form("NewWS"
sql = "INSERT INTO SystemsAccessReqs (UserNameL, UserNameF, UserNameMI, UserPhoneW, UserPhoneH, UserFax, Dept#, JobTitle, NewWS, ExistingWS, NewUser, ExistingUser, Marcam, JDE, WMS, Payroll, TA, NT, NTRoaming, LNotes, ColorLaser, DialUpAccess, Modem, LNotesGroup, ModelAS400Profile, ModelNTProfile, SerReqComments, DateSubmitted) VALUES ('" & strNameLast & "', '" & strNameFirst & "', '" & strNameMI & "', '" & strPhoneW & "', '" & strPhoneH & "', '" & strPhoneFax & "', '" & intDept & "', '" & strJobTitle & "', '" & blnNewWS & "', '" & blnExWS & "', '" & blnNewUser & "', '" & blnExUser & "', '" & blnMarcam & "', '" & blnJDE & "', '" & blnWMS & "', '" & blnPR & "', '" & blnTA & "', '" & blnNT & "', '" & blnNTRoam & "', '" & blnLNotes & "', '" & blnCLaser & "', '" & blnDialUp & "', '" & blnModem & "', '" & strModelAS400 & "', '" & strModelNT & "', '" & strLNotesGroup & "', '" & strSRComments & "', " & datCurDate & ""
conn.execute sql
%>
I have some checkboxes on my input form (ASP)
When I get to the ASP that performs the INSERT
to write the record, the boolean values for the checkboxes are correct... they are ON or OFF
correctly. But the INSERT statement fails with the error mentioned below.
What is the correct syntax to write the value to
the bit fields?
Thankyou. John
*** The Error *****
Microsoft OLE DB Provider for SQL Server error '80040e07'
Syntax error converting the varchar value ', ' to a column of data type bit.
*******************************
In the ASP where the error occurs:
<%
Dim blnNewWS
blnNewWS = Request.Form("NewWS"
sql = "INSERT INTO SystemsAccessReqs (UserNameL, UserNameF, UserNameMI, UserPhoneW, UserPhoneH, UserFax, Dept#, JobTitle, NewWS, ExistingWS, NewUser, ExistingUser, Marcam, JDE, WMS, Payroll, TA, NT, NTRoaming, LNotes, ColorLaser, DialUpAccess, Modem, LNotesGroup, ModelAS400Profile, ModelNTProfile, SerReqComments, DateSubmitted) VALUES ('" & strNameLast & "', '" & strNameFirst & "', '" & strNameMI & "', '" & strPhoneW & "', '" & strPhoneH & "', '" & strPhoneFax & "', '" & intDept & "', '" & strJobTitle & "', '" & blnNewWS & "', '" & blnExWS & "', '" & blnNewUser & "', '" & blnExUser & "', '" & blnMarcam & "', '" & blnJDE & "', '" & blnWMS & "', '" & blnPR & "', '" & blnTA & "', '" & blnNT & "', '" & blnNTRoam & "', '" & blnLNotes & "', '" & blnCLaser & "', '" & blnDialUp & "', '" & blnModem & "', '" & strModelAS400 & "', '" & strModelNT & "', '" & strLNotesGroup & "', '" & strSRComments & "', " & datCurDate & ""
conn.execute sql
%>