Access violation with sentences with SUM statement

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for SQL Server in Delphi and C++Builder
Post Reply
carl_rod
Posts: 1
Joined: Tue 27 Sep 2005 16:45

Access violation with sentences with SUM statement

Post by carl_rod » Tue 27 Sep 2005 19:05

Hello,

Actually I´m having a problem with the DBExpress driver for MS SQL 2.50.4.0 ( I already try the newest version).

When I try to open a dataset that include a SUM statement, the corresponding field to the SUM column, reports an access violation error accesing the property "IsNull".

What is the problem ?? I'm using CBuilder 6.0 over Windows 2000

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Wed 28 Sep 2005 07:06

We couldn't reproduce the problem.
Please send us (dbxsda*crlab*com) a complete small sample to demonstrate it and include script to create and fill table.

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Fri 30 Sep 2005 09:50

As before, we couldn't reproduce the problem.
Please try to connect to this server from other PC.
Also find sqloledb.dll on your PC and send us its version, 2000.80.190.0 for example

deldev
Posts: 1
Joined: Wed 30 Nov 2005 08:54

dbx can't evaluate sum fields

Post by deldev » Wed 30 Nov 2005 09:04

I had the same problem in cascaded SQLQueries.
2 Sum fields always returned 0 as value.

It costs me hours.

I think dbx can't get the fieldtype of sum aggregate.

if your only working with ms sql server I have a simple sql workaround:

:idea:
replace : select sum(a) as a from t
with : select convert(decimal(14,2), sum(a)) as a from t

regards

Post Reply