[solved]PostgreSQL - ERROR: multiple assignments to same col
Posted: 21.10.2013, 12:02
@EgonHugeist
On Delphi 2009, PostgreSQL 9.3
To reproduce:
1 Open a query
2 edit some field and post record
3 edit the same field and post again
in the SQL statement are twice a field updated. "ins004" in the sample.
Call Stack
On Delphi 2009, PostgreSQL 9.3
Code: Select all
2013-10-21 07:50:52 cat: Prepare, proto: postgresql-9, msg: PREPARE 'UPDATE public.s162car SET ins004=?,codemp=?,codfil=?,codcta=?,codcar=?,ins004=?,codemp=?,codfil=?,codcta=?,codcar=?,ins004=? WHERE codemp=? AND codfil=? AND codcta=? AND codcar=?', errcode: 0, error: ERROR: multiple assignments to same column "ins004"
1 Open a query
2 edit some field and post record
3 edit the same field and post again
in the SQL statement are twice a field updated. "ins004" in the sample.
Call Stack
Code: Select all
21/10/2013 07:44:05 Exceção EZDatabaseError ocorrida em TZAbstractDataset.InternalUpdate na linha 388 no arquivo ZAbstractDataset.pas
Mensage: SQL Error: ERROR: multiple assignments to same column "ins004"
Stack:
[007365D6] ZDbcPostgreSqlUtils.CheckPostgreSQLError (Line 720, "ZDbcPostgreSqlUtils.pas")
[00732C66] ZDbcPostgreSqlStatement.TZPostgreSQLCAPIPreparedStatement.ExectuteInternal (Line 803, "ZDbcPostgreSqlStatement.pas")
[0073375B] ZDbcPostgreSqlStatement.TZPostgreSQLCAPIPreparedStatement.Prepare (Line 1022, "ZDbcPostgreSqlStatement.pas")
[00733A27] ZDbcPostgreSqlStatement.TZPostgreSQLCAPIPreparedStatement.ExecuteUpdatePrepared (Line 1072, "ZDbcPostgreSqlStatement.pas")
[006B3D1B] ZDbcGenericResolver.TZGenericCachedResolver.PostUpdates (Line 889, "ZDbcGenericResolver.pas")
[006B5AC8] ZDbcCachedResultSet.TZAbstractCachedResultSet.PostRowUpdates (Line 471, "ZDbcCachedResultSet.pas")
[006B5C66] ZDbcCachedResultSet.TZAbstractCachedResultSet.PostUpdates (Line 578, "ZDbcCachedResultSet.pas")
[006B6C48] ZDbcCachedResultSet.TZAbstractCachedResultSet.UpdateRow (Line 1906, "ZDbcCachedResultSet.pas")
[007AA82B] ZAbstractDataset.TZAbstractDataset.InternalUpdate (Line 386, "ZAbstractDataset.pas")
[007AAB87] ZAbstractDataset.TZAbstractDataset.InternalPost (Line 504, "ZAbstractDataset.pas")
[005D2825] DB.TDataSet.CheckOperation
[005D2354] DB.TDataSet.Post
[005ED58D] DBCtrls.TDBNavigator.BtnClick