Many of our Firebird fields are numeric(14,2).
While the UniLoader works well with all other fields (string, date, int, etc)
trying to insert records containing these wider numerics gives me the error:
CANNOT CONVERT TYPE.
Simple example:
// connected to a firebird DB
// ID is integer
// com_set_amount is numeric(14,2) [yielding ftfmtBcd as tfield datatype]
// structure of cd_med is identical to cd_dental
mUniloader.TableName:='cd_dental';
q.sql.Add('select id, com_set_amount from cd_med');
q.open;
mUniloader.createcolumns;
mUniloader.loadfromdataset(q);
I have tried all kinds of things but the error is consistent:
"Cannot Convert Type"
If the numeric field is removed from the select everything is fine.
Thanks for the help and great forum,
tony M
UniLoader with firebird numeric(14,2)
-
AndreyZ
Re: UniLoader with firebird numeric(14,2)
I cannot reproduce this problem. Please try using the latest UniDAC version 5.0.1 and check if the problem persists. If it does, please specify the following:
- the script to create the cd_med and cd_dental tables;
- the exact version of your IDE;
- the exact version of Firebird server and client. You can learn it from the Info sheet of TUniConnection Editor.
- the script to create the cd_med and cd_dental tables;
- the exact version of your IDE;
- the exact version of Firebird server and client. You can learn it from the Info sheet of TUniConnection Editor.
-
tonymeadors
- Posts: 35
- Joined: Wed 28 Feb 2007 17:56
Re: UniLoader with firebird numeric(14,2)
Thank you for taking a look.
We are using UniDac 4.02 for this round of building
and prepping code for clients.
NOTE: in testing, the error only appears if the field actually
contains numeric data...if the column is empty no convert error
occurs. Not surprising.
Our further testing found that datsets containing a
field of datatype ftFMTBCD consistently gives this error when
we call the uniloader loadfromdataset function.
Firebird fieldsize Datatype in query dataset Uniloader
numeric(8,2) ftBCD Transfers
numeric(9,2) ftBCD Transfers
numeric(10,2) ftFMTBCD Cannot convert error
Hope this helps isolation and your determination whether
5.x is immune to this problem.
Sincerely,
tonyM
ClearCycle
We are using UniDac 4.02 for this round of building
and prepping code for clients.
NOTE: in testing, the error only appears if the field actually
contains numeric data...if the column is empty no convert error
occurs. Not surprising.
Our further testing found that datsets containing a
field of datatype ftFMTBCD consistently gives this error when
we call the uniloader loadfromdataset function.
Firebird fieldsize Datatype in query dataset Uniloader
numeric(8,2) ftBCD Transfers
numeric(9,2) ftBCD Transfers
numeric(10,2) ftFMTBCD Cannot convert error
Hope this helps isolation and your determination whether
5.x is immune to this problem.
Sincerely,
tonyM
ClearCycle
-
AndreyZ
Re: UniLoader with firebird numeric(14,2)
I cannot reproduce this problem neither with UniDAC 4.0.2 nor with UniDAC 5.0.1. Please specify all the information I asked you in my previous email.