Forum Moderators: mack
'Update Table:Xyz
strSQL = "Update Xyz set "
strSQL = strSQL & "AaaID= Session("AaaIDDvar") & ','"
strSQL = strSQL & "AaaDate= Session("AaaDateVar") & ','"
strSQL = strSQL & "AaaTime= Session("AaaTimeVar") & ','"
strSQL = strSQL & "Where Xyz = 'GetRequestForm("masterkey")'"
dbConnection.Execute strSQL
Regards
Heje
'Update Table:Xyz
strSQL = "Update Xyz set "
strSQL = strSQL & "AaaID= '" & Session("AaaIDDvar") & ',"
strSQL = strSQL & "AaaDate= '" & Session("AaaDateVar") & ',"
strSQL = strSQL & "AaaTime= '" & Session("AaaTimeVar") & ' "
strSQL = strSQL & "Where Xyz = '" & GetRequestForm("masterkey") & "'"
dbConnection.Execute strSQL
'Update Table:Xyz
strSQL = "Update Xyz set "
strSQL = strSQL & "AaaID=" & Session("AaaIDDvar") & ","
strSQL = strSQL & "AaaDate=#" & Session("AaaDateVar") & "#,"
strSQL = strSQL & "AaaTime=#" & Session("AaaTimeVar") & "#,"
strSQL = strSQL & "Where Xyz = " & Request.Form("masterkey")
dbConnection.Execute strSQL
This assumes though that AaaID is numeric, AaaDate and AaaTime are datetime fields and Xyx in your where clause is the name of a numeric field within the Xyz table not the table name itself
I had to change your suggestions a little bit:
1) the value regarding the masterkey was changed to a session variable because the other methods didn't work. The statement you helped with is to be inserted into a complex code (produced by a Code generator) having an internal architecture and system variables I do not fully understand at this point in time.
2) I removed the "#" from the line regarding ActionTime because this really is a text field which I should have stated.
3) I removed the "," in the line re AaaTimeVar
strSQL = "Update Xyz set "
strSQL = strSQL & "AaaID=" & Session("AaaIDvar") & ","
strSQL = strSQL & "AaaDate=#" & Session("AaaDateVar") & "#,"
strSQL = strSQL & "AaaTime=" & Session("AaaTimeVar") & " "
strSQL = strSQL & "Where XyzID = " & session("masterkeyvar")
dbConnection.Execute strSQL
Once again - Thank you so very much for your help.
All the best
Heje