UniQuery.Options.UpdateAllFields

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
hughespa
Posts: 81
Joined: Sat 23 Aug 2008 08:36
Location: W. Australia

UniQuery.Options.UpdateAllFields

Post by hughespa » Mon 12 Jul 2010 14:01

Hi,

This is using D2010 and UniDAC 3.00.0.10.

My test table has 4 test fields and I have a query which does a select * from table. The UpdateAllFields option is true. I only define persistent fields for 2 of the 4 fields in the table.

1. Running against SQL Server 2008, Native Client, I can update the two persistent fields and the update works leaving the other two fields in the table with nulls.

2. Running against PostgreSQL 9 (beta 2), the same setup fails with the error: found field corresponding parameter fld_c'
where fld_c and fld_d are the two fields not defined as persistent fields.

I just wondered why SQL Server and Pg behave differently in this same case?

Regards, Paul.

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Tue 13 Jul 2010 12:17

Hello

To resolve your issue we need DDL scripts for creating the test table in the MS SQL database and in the PostgreSQL database. Please provide us these scripts.

hughespa
Posts: 81
Joined: Sat 23 Aug 2008 08:36
Location: W. Australia

Post by hughespa » Tue 13 Jul 2010 12:37

Hi,

The pg script is:

CREATE TABLE test_table
(
id serial NOT NULL,
fld_a character varying(10),
fld_b character varying(10),
fld_c character varying(10),
fld_d character varying(10),
CONSTRAINT test_table_pk PRIMARY KEY (id)
);

and the MSSQL is:

CREATE TABLE test_table
(
id int IDENTITY(1,1) NOT NULL,
fld_a nvarchar(10) NULL,
fld_b nvarchar(10) NULL,
fld_c nvarchar(10) NULL,
fld_d nvarchar(10) NULL,
CONSTRAINT test_table_pk PRIMARY KEY (id) );

I use the following SpecificOptions on the connection:
pg:
UseUnicode = True

mssql:
OLEDBProvider=prNativeClient
MultipleActiveResultSets=True
AutoTranslate=True

and on the UniQuery, I only define persistent fields for id, fld_a & fld_b

Regards, Paul.

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Tue 13 Jul 2010 15:46

Hello

Thank you for the information. We have reproduced your issue. We will notify you as soon as we have any result.

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Wed 14 Jul 2010 09:13

Thank you for the information. We have reproduced this problem and fixed it. This fix will be included in the next UniDAC and PgDAC builds.

hughespa
Posts: 81
Joined: Sat 23 Aug 2008 08:36
Location: W. Australia

Post by hughespa » Thu 15 Jul 2010 02:46

Excellent work guys, again!

Thank you.

Regards, Paul.

Post Reply