Dear friends,
Unless I stick all database (Zeos - MySQL) activity between the following error trap, I get no feedback for SQL errors. Clearly I need to change some setting in Delphi to be more strict with errors.
Try
//
// Database activity here
//
Except
on e:Exception do ShowMessage(e.message);
End;
Any ideas.
MParak
Stupid Question - Raising errors from Delphi 5.0
Moderators: gto, cipto_kh, EgonHugeist
Hi mdeams,
In answer to your question, I need help at run time, not in debug mode.
I get the impression from your reply that the ZsqlMonitor is the answer, but have no clue how this component works. I will scratch around and see if I can figure out how to use this.
Will let you know in this thread how it goes.
Warmest regards
M.
In answer to your question, I need help at run time, not in debug mode.
I get the impression from your reply that the ZsqlMonitor is the answer, but have no clue how this component works. I will scratch around and see if I can figure out how to use this.
Will let you know in this thread how it goes.
Warmest regards
M.
-
- Junior Boarder
- Posts: 38
- Joined: 22.11.2005, 09:11
- Location: Skövde, Sweden
- Contact:
Well, we use Zeoslib in Delphi 5.0 and I can guarantee that invalid SQL statements or other database-related errors indeed raises exceptions correctly.
I think there must be some other error in your program. Do have any empty "try / except end;" somewhere? Or do you trap Application.OnException and suppress it there?
ZSqlMonitor logs all queries executed, plain and simple. It is not needed to handle exceptions.
By the way, there are no settings to make Delphi more or less strict with exceptions.
/ Matt
I think there must be some other error in your program. Do have any empty "try / except end;" somewhere? Or do you trap Application.OnException and suppress it there?
ZSqlMonitor logs all queries executed, plain and simple. It is not needed to handle exceptions.
By the way, there are no settings to make Delphi more or less strict with exceptions.
/ Matt
Coffee clarifies the mind, improves morale, lifts the spirit and motivates and inspires to focused, productive work.