Hello:
I have an sql query that works just fine when I run it
directly in Access but when I run it on a web site, it gives me an
error "Data type mismatch in criteria expression".
I am working with transactions and this is an update of a
table within a transaction.
Here is the code:
con.execute "UPDATE tblWells SET API_Number='" &
Request.Form("API_Number") & "', Well_Name='" &
Request.Form("Well_Name") & "', Drill='" &
Request.Form("Drill") & "', Reenter='" &
Request.Form("Reenter") & "', horizontal='" &
Request.Form("horizontal")& "', Duration='" &
Request.Form("Duration") & "', OilWell='" &
Request.Form("OilWell") & "', GasWell='" &
Request.Form("GasWell") & "', Other='" &
Request.Form("Other") & "', SingleZone='" &
Request.Form("SingleZone") & "', MultipleZone='" &
Request.Form("MultipleZone")& "', NumAcresLease='" &
Request.Form("NumAcresLease") & "', LeaseSerialNumber='" &
Request.Form("LeaseSerialNumber") & "', LeaseName='" &
Request.Form("LeaseName") & "', WellNumber='" &
Request.Form("WellNumber") & "', state='" &
Request.Form("state") & "', county='" &
Request.Form("county") & "', wellheadElevation='" &
Request.Form("wellheadElevation") & "', groundElevation='"
& Request.Form("groundElevation") & "', ProposedDepth='"
& Request.Form("ProposedDepth") & "',
DistanceTownPostOffice='" &
Request.Form("DistanceTownPostOffice") & "',
DirectionTownPostOffice='" &
Request.Form("DirectionTownPostOffice") & "',
Distance_Nearest_Property_Line='" &
Request.Form("Distance_Nearest_Property_Line") & "',
DistanceNearestWell='" & Request.Form("DistanceNearestWell")
& "', UnitSpacing='" & Request.Form("UnitSpacing") & "'
WHERE WellID=1"
I can't figure why the query would work fine in Access and
not on the webpage.
Thanks.