I'm trying to figure out a code to prevent an error...
If I include this code in the AFTER RECORD DELETE and then, delete all the details, I receive and error:
[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'where'.
How do I tell my code that rstmp(0) must be zero?
Thanks in advance.
Here's my code:
[codebox]str = "select sum(Total1) AS SubTot from TABLE1 where TableKey=" & dict("tableKey")
Set rstmp = server.CreateObject("ADODB.Recordset")
rstmp.open str,dbConnection
'update master table
dbConnection.Execute "update MASTERTABLE set Totals=" & rstmp(0) & " where TableKey=" & dict("tableKey")
rstmp.close
set rstmp=nothing
[/codebox]