...and the answer is, from Bruce's comment on his original answer: "@Breck: there is currently no mechanism for automatically recompiling events. You can, of course, put the logic for the event in a procedure which the event calls. – Bruce Hay"
Here's the scenario in 18.104.22.1686: An updated
If this is expected behavior, the Help should be updated to mention the possibility that
Invalid statement Error constant SQLE_INVALID_STATEMENT ODBC 2 State ERROR ODBC 3 State ERROR Severity 16 SQLCODE –130 SQLSTATE 07W02 Sybase error code 13628 Probable cause The statement identifier generated by a PREPARE passed to the database for a further operation is invalid.
The most likely cause for the problem described here is that the procedure was still being used by at least one connection when the ALTER TABLE was performed. For example, if the procedure returns a result set and the application cursor had not been closed, then the procedure would still be in use. Once all references to the procedure have completed, the next call will cause the procedure to be "recompiled" automatically.
answered 19 Nov '10, 19:34