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

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.
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
How to fix display issue, screen flickering issue when I plug in power cord to the machine. Before I start explaining the solution lets check out once the issue how it looks like after I connect the power cord. most of you also have faced this…
Stellar Phoenix SQL Database Repair software easily fixes the suspect mode issue of SQL Server database. It is a simple process to bring the database from suspect mode to normal mode. Check out the video and fix the SQL database suspect mode problem.
Suggested Courses
Course of the Month4 days, 1 hour left to enroll

599 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