Encounter error reading a negative numeric value with precision of (32,8)

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for SQL Server in Delphi and C++Builder
Post Reply
ccy
Posts: 10
Joined: Tue 04 Oct 2005 03:39

Encounter error reading a negative numeric value with precision of (32,8)

Post by ccy » Fri 06 Oct 2006 04:46

Hi,

I am using BDS 2006 Prof with Corelab DBExpress driver version 3.0.4.0. Please follow the steps to replay the error:

1. CREATE DATABASE dbdemo

2. CREATE TABLE Demo
(
NewValue NUMERIC(32, 8)
)

3. INSERT INTO Demo
VALUES(-999999999999999999999999.99999999)

4. Write a datasnap application using BDS 2006:

ClientDataset -> DataSetProvider -> SQLDataSet -> SQLConnection

5. execute the following code:

procedure TfmDemo.btnTest1Click(Sender: TObject);
begin
if cdsData.Active then cdsData.Close;
cdsData.Open;
end;

An error message will prompt out when cdsData.Open is invoke:

'Database Server Error: NewValue: FieldStatus = $00000004, Value = -999999999999999999999999.9999999 (D:\Projects\Delphi\Sdac\Source\OLEDBAccess.pas, line 6684)'

I have a test case build here. If you can't replay the problem, please let me know where to send the testcase.

Best regards,
Chau Chee Yang

Jackson
Posts: 512
Joined: Thu 26 Jan 2006 10:06

Post by Jackson » Fri 06 Oct 2006 12:56

This message reports about data overflow.
If you use TSQLConnection component then convert it to TCRSQLConnection
(context menu of TSQLConnection component).
Then in Params property set EnableBCD property to False.

ccy
Posts: 10
Joined: Tue 04 Oct 2005 03:39

Post by ccy » Sat 07 Oct 2006 01:09

I use TCRSQLConnection and set Params.Values['EnableBCD'] := 'False';

But it doesn't work. Most of my test case fail after I did the changes.

Jackson
Posts: 512
Joined: Thu 26 Jan 2006 10:06

Post by Jackson » Mon 09 Oct 2006 08:56

We couldn't reproduce the problem.
Please send us a complete small test project to reproduce the problem;
it is desirable to use Northwind or Master schema objects, otherwise include definition of your own database objects; don't use third party components

Also supply us following information
- Exact version of Delphi or C++ Builder
- Exact version of DbxSda. You can see it in ReadMe.html
- Exact version of Microsoft SQL Server and OLE DB provider that you use.
You can see it in version info of SQLOLEDB.DLL and SQLNCLI.DLL.

tonny
Posts: 4
Joined: Wed 03 Jan 2007 07:11

Post by tonny » Wed 03 Jan 2007 07:56

Hi,

I'm faced the same problem as what ccy said.

"Database Server Error: NewValue: FieldStatus = $00000004, Value = -999999999999999999999999.9999999 (D:\Projects\Delphi\Sdac\Source\OLEDBAccess.pas, line 6734)"

May I know how do I send the Test Project to you ?

Anyway, the following is the information:

1. Delphi 10.0.2288.42451 Update2
2. DbxSda 3.10.7.0
3. Microsoft SQL Server 8.00.760(SP3)
4. SQLOLEDB 2000.85.1117.0

Jackson
Posts: 512
Joined: Thu 26 Jan 2006 10:06

Post by Jackson » Wed 03 Jan 2007 14:48

Please send your example to evgeniym*crlab*com

tonny
Posts: 4
Joined: Wed 03 Jan 2007 07:11

Post by tonny » Thu 04 Jan 2007 02:14

Thanks EvegniyM. I've send my Test Project via your email. Hope you've received it.

Regards: Tonny

tonny
Posts: 4
Joined: Wed 03 Jan 2007 07:11

Post by tonny » Wed 07 Feb 2007 02:06

Hi EvgeniyM,

I've follow the instruction as you reply me via the email. But i get the incorrect result --> '-1E24'.

Anyway, I've send my Test Project (after modified) via your email [email protected].

Thanks for spending time to read my messasge.

Regards: Tonny

Jackson
Posts: 512
Joined: Thu 26 Jan 2006 10:06

Post by Jackson » Thu 08 Feb 2007 12:52

Thank you for your example. It did help us very much.
We have found a problem and fixed it.
This fix will be included in the next DbxSda build.
Please watch for announcements at the forum.

tonny
Posts: 4
Joined: Wed 03 Jan 2007 07:11

Post by tonny » Sat 07 Apr 2007 06:16

Hi EvgeniyM,

May I know when is the release build for DbxSda ? B'cos I'm quite urgent about the new DbxSda driver to solve the above problem.

Thanks for spending time to read my message.

Regards: Tonny

Jackson
Posts: 512
Joined: Thu 26 Jan 2006 10:06

Post by Jackson » Fri 13 Apr 2007 15:18

The next build of DbxSda will be available in about a week or two.

Post Reply