Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Getting apparent incorrect DB.TField DataType when using ClientDataSet



Permlink Replies: 0
I-Min Mau

Posts: 1
Registered: 4/30/09
Getting apparent incorrect DB.TField DataType when using ClientDataSet
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 14, 2015 9:07 AM
Hi,

We have an application that was updated from old Borland C++ Builder/DBE to Embarcadero C++ Builder 2010 with DBExpress. One perplexing issue we encountered at a customer site in Spain, which after much investigation, it seems that:

Even though on this particular table of interest we have SMALLINT columns on the actual underlying Oracle database schema, when saving the TField seems to be of the VARCHAR2(128) binding instead. I I have since added logging that shows the DataType property on the TField to be 37. Since this is a read only property and is set when the ClientDataSet opens the query against that table, I am not aware of any easy way to force it to SMALLINT.

In the US this is not a problem but in Spain the associated regional setting results in error when the code attempt to convert a string with decimal point into a numeric, since the decimal separator in US is not the same way in Spain.

Anyone has any idea why the TField DataType behaivor is such and how to fix?

Thanks very much!
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02