Page 1 of 1

UniQuery.Options.UpdateAllFields

Posted: Mon 12 Jul 2010 14:01
by hughespa
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.

Posted: Tue 13 Jul 2010 12:17
by bork
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.

Posted: Tue 13 Jul 2010 12:37
by hughespa
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.

Posted: Tue 13 Jul 2010 15:46
by bork
Hello

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

Posted: Wed 14 Jul 2010 09:13
by bork
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.

Posted: Thu 15 Jul 2010 02:46
by hughespa
Excellent work guys, again!

Thank you.

Regards, Paul.