parallon
01-08-2008, 06:00 PM
Hello all. I have the following Update statement:
[... all my variables getting populated]
vcounter = Request.Form("MM_recordId") (this is the one I am having trouble with)
sQry2 = "UPDATE tblEmpTime SET dbCaseNo = '" & vCaseNo & "', dbOrg = '" & vOrg & "', dbContract = '" & vContract & "', dbSupervisor = '" & vSupervisor & "', dbAdmin = '" & vAdmin & "', dbTestSU = '" & vTestSU & "', dbTestOPS = '" & vTestOPS & "', dbTestCU = '" & vTestCU & "', dbSiteMaint = '" & vSiteMaint & "', dbFabrication = '" & vFabrication & "', dbEquipment = '" & vEquipment & "', dbTraining = '" & vTraining & "', dbSupervision = '" & vSupervision & "', dbHoliday = '" & vHoliday & "', dbSickPTO = '" & vSickPTO & "', dbVacation = '" & vVacation & "', dbOvertime = '" & vOvertime & "', JobDesc = '" & vJobDesc & "', Hours = '" & vHours & "', JobTask = '" & vJobTask & "', Location = '" & vLocation & "' WHERE Counter = '" & vCounter & "'"
The problem seems to be that the last variable 'vCounter' is an AutoNumber in Access. I keep getting the following error when running the script:
Data type mismatch in criteria expression.
Dreamweaver had originally created the code in the confusing way that it does, but I am slowly going through and recoding all of this stuff by hand since it is A LOT easier to understand. DW originally assigned the value with the by Request.Form("MM_recordId") but when trying to assign the value of Request.Form("MM_recordId") to vCounter, I get an error.
I've even changed the code to read "... WHERE Counter = " & vCounter which works sometimes for numbers, but to no prevail. Does anyone out there have any suggestions?
Thanks in advance,
Parallon
[... all my variables getting populated]
vcounter = Request.Form("MM_recordId") (this is the one I am having trouble with)
sQry2 = "UPDATE tblEmpTime SET dbCaseNo = '" & vCaseNo & "', dbOrg = '" & vOrg & "', dbContract = '" & vContract & "', dbSupervisor = '" & vSupervisor & "', dbAdmin = '" & vAdmin & "', dbTestSU = '" & vTestSU & "', dbTestOPS = '" & vTestOPS & "', dbTestCU = '" & vTestCU & "', dbSiteMaint = '" & vSiteMaint & "', dbFabrication = '" & vFabrication & "', dbEquipment = '" & vEquipment & "', dbTraining = '" & vTraining & "', dbSupervision = '" & vSupervision & "', dbHoliday = '" & vHoliday & "', dbSickPTO = '" & vSickPTO & "', dbVacation = '" & vVacation & "', dbOvertime = '" & vOvertime & "', JobDesc = '" & vJobDesc & "', Hours = '" & vHours & "', JobTask = '" & vJobTask & "', Location = '" & vLocation & "' WHERE Counter = '" & vCounter & "'"
The problem seems to be that the last variable 'vCounter' is an AutoNumber in Access. I keep getting the following error when running the script:
Data type mismatch in criteria expression.
Dreamweaver had originally created the code in the confusing way that it does, but I am slowly going through and recoding all of this stuff by hand since it is A LOT easier to understand. DW originally assigned the value with the by Request.Form("MM_recordId") but when trying to assign the value of Request.Form("MM_recordId") to vCounter, I get an error.
I've even changed the code to read "... WHERE Counter = " & vCounter which works sometimes for numbers, but to no prevail. Does anyone out there have any suggestions?
Thanks in advance,
Parallon