Subject | Re: External table weirdness |
---|---|
Author | roar4711 |
Post date | 2009-04-13T11:37:41Z |
This is a reply with a solution to my own question. Hope it can help anyone.
I've been trying to import data from an external table, into a firebird database, with random success.
The data is very simple (as you can see in previous posts) but the import operation have failed from time to time with the following error (on the select/insert statement):
"
SQL Message : -802
Arithmetic overflow or division by zero has occurred.
Engine Code : 335544321
Engine Message :
arithmetic exception, numeric overflow, or string truncation
"
I'm using v2.1.1 embedded (32 bit Windows version) and have tested on most types of Windows, including Windws XP (32 bit), Windows Vista (32 bit and 64 bit), Windows 2008 (64 bit).
After some time I noticed that Flamerobin was able to run the select/insert statement, if I prepared the external file just like the converter did.
After many hours of debugging, reading and almost weeping, I found the difference between my program and Flamerobin.
The code in the converter inherited some code from another project, that uses UTF8 as the character set when opening a database.
I noticed that my Flamerobin session did not.
So I fixed this in the code (or rather not setting any character set, wont matter anyway, just got numerical data in the database).
And it worked.
Dont know if this is an issue in ibpp, firebird, or my own understanding of the whole tool chain.
But the problem is resolved. All tests that I've tried where the converter failed, now works.
Thanks for all that have comment on this post.
I've been trying to import data from an external table, into a firebird database, with random success.
The data is very simple (as you can see in previous posts) but the import operation have failed from time to time with the following error (on the select/insert statement):
"
SQL Message : -802
Arithmetic overflow or division by zero has occurred.
Engine Code : 335544321
Engine Message :
arithmetic exception, numeric overflow, or string truncation
"
I'm using v2.1.1 embedded (32 bit Windows version) and have tested on most types of Windows, including Windws XP (32 bit), Windows Vista (32 bit and 64 bit), Windows 2008 (64 bit).
After some time I noticed that Flamerobin was able to run the select/insert statement, if I prepared the external file just like the converter did.
After many hours of debugging, reading and almost weeping, I found the difference between my program and Flamerobin.
The code in the converter inherited some code from another project, that uses UTF8 as the character set when opening a database.
I noticed that my Flamerobin session did not.
So I fixed this in the code (or rather not setting any character set, wont matter anyway, just got numerical data in the database).
And it worked.
Dont know if this is an issue in ibpp, firebird, or my own understanding of the whole tool chain.
But the problem is resolved. All tests that I've tried where the converter failed, now works.
Thanks for all that have comment on this post.