Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Checkbox differences in SQL and Access

16 views
Skip to first unread message

Drew

unread,
Jul 6, 2004, 4:18:45 PM7/6/04
to
I have been working with this for a while now and am almost finished. I am
inserting and updating 2 databases, they are the same, one is SQL Server and
the other is Access 2002. My update query is failing and the problem is the
Active checkbox I have. It seems to be trying to insert 1 into the active
field in Access (it is a true/false field). Here is the error I am
recieving,

Error Type:
Microsoft JET Database Engine (0x80040E14)
Syntax error (missing operator) in query expression
'''CliLeaveStatus='Inpatient'CliLivingArea='12A'CliDOB='11/29/1956'CliSSN='1
23-45-6789'CliRace='White'CliSex='Female'CliBirthState='Georgia'CliCityofRes
idence='Wytheville'CliAgencyCode='738''.
/swvtc/CliCore/changeClient.asp, line 161

Line 161 contains the execute command, but here is my SQL Statement and
code,

'SQL for inserting into MDB
sql="UPDATE CliCoreTable SET "
sql=sql & "RegNo='" & Request.Form("RegNo") & "',"
sql=sql & "CliEPI='" & Request.Form("CliEPI") & "',"
sql=sql & "CliLName='" & Request.Form("CliLName") & "',"
sql=sql & "CliFName='" & Request.Form("CliFName") & "',"
sql=sql & "CliMM='" & Request.Form("CliMM") & "',"
sql=sql & "CliActive='" & Request.Form("CliActive") & "'"
sql=sql & "CliLeaveStatus='" & Request.Form("CliLeaveStatus") & "'"
sql=sql & "CliLivingArea='" & Request.Form("CliLivingArea") & "'"
sql=sql & "CliDOB='" & Request.Form("CliDOB") & "'"
sql=sql & "CliSSN='" & Request.Form("CliSSN") & "'"
sql=sql & "CliRace='" & Request.Form("CliRace") & "'"
sql=sql & "CliSex='" & Request.Form("CliSex") & "'"
sql=sql & "CliBirthState='" & Request.Form("CliBirthState") & "'"
sql=sql & "CliCityofResidence='" & Request.Form("CliCityofResidence") & "'"
sql=sql & "CliAgencyCode='" & Request.Form("CliAgencyCode") & "'"
sql=sql & " WHERE customerID='" & Request.Querystring("RegNo") & "'"

'execute Update on MDB
Set MM_editCmd = Server.CreateObject("ADODB.Command")
MM_editCmd.ActiveConnection = MM_editConnection2
MM_editCmd.CommandText = sql
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close <------ THIS IS LINE 161

Thanks,
Drew

Julian Roberts

unread,
Jul 6, 2004, 4:37:36 PM7/6/04
to
Looks to me like you've missed out a bunch of commas

--
Jules
http://www.charon.co.uk/charoncart
Charon Cart 3
Shopping Cart Extension for Dreamweaver MX/MX 2004

Drew

unread,
Jul 6, 2004, 4:46:33 PM7/6/04
to
Cutting and pasting errors...

that got it... sorry about that...

drew

"Julian Roberts" <ne...@charon.co.uk> wrote in message
news:ccf2ji$eub$1...@forums.macromedia.com...

Drew

unread,
Jul 6, 2004, 4:54:29 PM7/6/04
to
Now it is giving me this error, line 163 is the execute

Error Type:
Microsoft JET Database Engine (0x80040E10)
No value given for one or more required parameters.
/swvtc/CliCore/changeClient.asp, line 163

Here is my SQL Statement....

UPDATE CliCoreTable SET
RegNo='1020',CliEPI='1',CliLName='TESTING',CliFName='TEST',CliMM='T',CliActi
ve='checkbox',CliLeaveStatus='Inpatient',CliLivingArea='12A',CliDOB='11/29/1
956',CliSSN='123-45-6789',CliRace='White',CliSex='Female',CliBirthState='Geo
rgia',CliCityofResidence='Wytheville',CliAgencyCode='738' WHERE
customerID='1020'

What is the deal with the CliActive = 'checkbox'

Thanks,
Drew


"Julian Roberts" <ne...@charon.co.uk> wrote in message
news:ccf2ji$eub$1...@forums.macromedia.com...

Message has been deleted

mr.sanja...@gmail.com

unread,
May 4, 2013, 4:25:02 PM5/4/13
to

mr.sanja...@gmail.com

unread,
May 4, 2013, 4:27:29 PM5/4/13
to
0 new messages