UpdateSQL component dropping decimals

Posted on 1999-07-15
Medium Priority
Last Modified: 2010-04-06
Here's the problem we're having.  We are using Delphi 3, and we jusr recently upgraded from Oracle 7.3 to Oracle 8i.  Thus we upgraded the BDE to version 5.01 and our Oracle client to 8.05.  Plus we are now using the SQLORA8.DLL.
We use cached updates everywhere and many UpdateSQL objects.  We are now experiencing a problem with Oracle numeric fields that allow digits to the right of the decimal point. (Numeric(20,2))  Our TField for these columns are TBCDField and we have EnableBCD set to TRUE in our BDE.  The problem is when we ApplyUpdates to one of these tables, any number (ex. 1.75) is dropping the decimal point entirely.  (It's in Oracle as 175)  I have traced it into the UpdateSQL component and the value seems to be correct.  However, using SQL monitor, the value being passed to Oracle is NOT.  In testing I have found that it has something to do with this component.  There are other datasets that work that do NOT have an UpdateSQL component.  As soon as I add one, it breaks.

If you have any suggestings, or if you know this is a known problem it would be appreciated.

Greg Baker
Question by:gjbaker
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 1388854

  Are you certain your not using an integer in the updateSQL component? Sounds like a translation problem between the BDE and whatever driver (ODBC?) your using to connect to Oracle. I'm also assuming that the data went correctly with version 7.3. Check your precision within the BDE and if your using ODBC, put a trace on it (log file) to determine if the data is being altered before being sent to the server. Check also your docs (in Oracle v8) for the Numeric datatype and make sure they didn't make any changes to the way this data is stored between v 7.3 & 8

Good luck with you project!
LVL 27

Expert Comment

ID: 1388855
hi gjbaker,

? why must it be a bcd-field (maybe its no BCD and the decimalpoint is lost during the conversions) ?
? what happens if you turn off enable bcd ?


Author Comment

ID: 1388856

An UpdateSQL object does not define any datetypes.  We are using the Native Oracle 8i driver included in the BDE.  The exact code worked fine (with the same table definitions) on Oracle 7.3, using the native Oracle 7.3
driver in the BDE 5.01.
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

LVL 15

Expert Comment

ID: 1388857
Do not use BCD numbers. They are for integer numbers only.

LVL 15

Expert Comment

ID: 1388858
gjbaker? Are you there?


Author Comment

ID: 1388859

I'm removing all the BCD fields and changing to Floats.  The TFloatFields seem to be working better.  I still think there is a bug in the Borland SQLORA8.DLL Oracle driver.
Thanks for the help, at least I found a work around.

LVL 15

Accepted Solution

simonet earned 600 total points
ID: 1388860
>is a bug in the Borland SQLORA8.DLL

Yes, there is, but only for Oracle 8.0.3 and other installations of Oracle that use the same Sql*Net version as that one of Oracle 8.0.3. There are no reported bugs for ORacle 8.0.4 and newer.

Anyway, I am glad it's working now!




Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question