Icon View Incident Report

Minor Minor
Reported By: Alec
Reported On: 11/6/2007
For: Version 1.05 Build 2
# 2470 Using OLDROW or NEWROW Aliases with USING Clause Parameters Causes Compilation Error

I am getting an error when executing the following statement:

================================================================================
SQL Error (ElevateDB 1.05 Build 2)
================================================================================

ElevateDB Error #700 An error was found in the statement at line 7 and column 38
(Invalid expression . found, table qualifier not allowed)

CREATE TRIGGER "MailAccountAfterDelete" AFTER DELETE
ON "MailAccounts"
BEGIN
 DECLARE MailFoldersCursor SENSITIVE CURSOR FOR MailFoldersStatement;

 PREPARE MailFoldersStatement FROM 'SELECT GUID FROM MailFolders WHERE MailFolders.AccountID = ?';
 OPEN MailFoldersCursor USING OLDROW.GUID;
 
 START TRANSACTION ON TABLES MailFolders;
 BEGIN
   WHILE NOT EOF(MailFoldersCursor) DO DELETE FROM MailFoldersCursor;
   END WHILE;
 
   COMMIT;
 
   EXCEPTION
     ROLLBACK;
 END;

END



Comments Comments and Workarounds
The workaround is to declare a temporary variable that is defaulted to the OLDROW.GUID column value and then use the temporary variable instead of the OLDROW.GUID column value directly.


Resolution Resolution
Fixed Problem on 11/7/2007 in version 1.06 build 1


Products Affected Products Affected
ElevateDB Additional Software and Utilities
ElevateDB DAC Client-Server
ElevateDB DAC Client-Server with Source
ElevateDB DAC Standard
ElevateDB DAC Standard with Source
ElevateDB DAC Trial
ElevateDB VCL Client-Server
ElevateDB VCL Client-Server with Source
ElevateDB VCL Standard
ElevateDB VCL Standard with Source
ElevateDB VCL Trial

Image