Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2013-10

SqlDB+Firebird - incomplete sql error messages

9 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

When I run sql insert statements (that I know will cause an error) using the FlameRobin tool, I get a detailed error message mentioning which table and field caused the problem.

Using SqlDB (via tiOPF) I only get a cryptic error message where the table and field names are referenced as "@1" and "@2" respectively, instead of the real values. See attached screenshot.

Is this an issue with SqlDB, or is it maybe something the tiOPF's SqlDB persistence layer is doing?

Regards,
- Graeme -

Reinier Olislagers
to Graeme Geldenhuys
Graeme Geldenhuys wrote 6 lines
Using SqlDB (via tiOPF) I only get a cryptic error message where the table and field names are referenced as "@1" and "@2" respectively, instead of the real values. See attached screenshot. Is this an issue with SqlDB, or is it maybe something the tiOPF's SqlDB persistence layer is doing?

The latter, I'd think. SQLDB's Firebird exception gives quite some details, IIRC. (And you can check with some code adapted from the database bug reporting article on the wiki - but it seems down for me right now)

Graeme Geldenhuys

Hi,

database bug reporting article on the wiki - but it seems down for me right now)

Do you have the URL for that?

Regards,
G.

Michael Van Canneyt
to Graeme Geldenhuys: When I run sql insert statements (that I know will cause an error) using the FlameRobin…
Graeme Geldenhuys wrote 9 lines
Hi, When I run sql insert statements (that I know will cause an error) using the FlameRobin tool, I get a detailed error message mentioning which table and field caused the problem. Using SqlDB (via tiOPF) I only get a cryptic error message where the table and field names are referenced as "@1" and "@2" respectively, instead of the real values. See attached screenshot. Is this an issue with SqlDB, or is it maybe something the tiOPF's SqlDB persistence layer is doing?

One possibility is that the use of parameters messes up the error message ? Flamerobin does not use parameters, but tiOPF does.

In each case, SQLDB simply returns the error message that firebird gives. It does no processing of this message.

It may be that tiOPF does some post-processing, but you're better placed to answer this question.

Michael.

Reinier Olislagers
to Graeme Geldenhuys: Do you have the URL for that? G.
Graeme Geldenhuys wrote 6 lines
Hi, > database bug reporting article on the wiki - but it seems down for me > right now) Do you have the URL for that?

Here you go, with a pretty ribbon on top :)
http://wiki.lazarus.freepascal.org/Database_bug_reporting

(By heart:) It should be sufficient to modify the code:
- sql to insert erroneous data,
- execute the query instead of opening the query
- catch the exception.

Graeme Geldenhuys
Reinier Olislagers wrote
Here you go, with a pretty ribbon on top :)

Thanks! I couldn't search the wiki, because the wiki site is down.

Regards,
Graeme

Graeme Geldenhuys

Hi,

Michael Van Canneyt wrote
One possibility is that the use of parameters messes up the error message ?

Ah, that could be it. I searched tiOPF source code and can't find any post-processing of DB errors, but I'm still looking. I'll also create a quick test project using SqlDB directly (with parameters) and see if I get the same result as before. If so, that would then confirm your idea of the parameters messing up the error messages. Regards,
Graeme

LacaK
to Graeme Geldenhuys: When I run sql insert statements (that I know will cause an error) using the FlameRobin…

I remember that similar problem can be somehow related to firebird.msg and firebird.dll versions mismasch or so.
See http://www.firebirdfaq.org/faq288/
L.

Show quoted text 28 lines
Hi, When I run sql insert statements (that I know will cause an error) using the FlameRobin tool, I get a detailed error message mentioning which table and field caused the problem. Using SqlDB (via tiOPF) I only get a cryptic error message where the table and field names are referenced as "@1" and "@2" respectively, instead of the real values. See attached screenshot. Is this an issue with SqlDB, or is it maybe something the tiOPF's SqlDB persistence layer is doing? Regards, - Graeme - ------------------------------------------------------------------------ ------------------------------------------------------------------------ _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal