Hi,
I think there is an error inside TZAbstractDataset.CommitUpdates in ZAbstractDataSet.pas. There should be a call to CachedResultSet.PostUpdates instead of CachedResultSet.CancelUpdates. PostUpdates call PostRowUpdates(OldRowAccessor, NewRowAccessor), which will copy buffer from NewRowAccessor. If we call CancelUpdates the buffer is copied from InitialRow to CurrentRow.
To fix it, we should modify:
procedure TZAbstractDataset.CommitUpdates;
begin
CheckBrowseMode;
if CachedResultSet <> nil then
CachedResultSet.CancelUpdates;
end;
Into :
procedure TZAbstractDataset.CommitUpdates;
begin
CheckBrowseMode;
if CachedResultSet <> nil then
CachedResultSet.PostUpdates;
end;
All the best,
Bogdan
TZAbstractDataset.CommitUpdates
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
Re: TZAbstractDataset.CommitUpdates
First i was thinking you are right, but:
http://docwiki.embarcadero.com/Librarie ... mitUpdates
Bogdan, something else:
Could you please recompile FreeTDS? With the bcp_functions(i'll implement the batch insartiation later) and it would be nice to get the three missing functions running:
function dbRetData(dbProc: PDBPROCESS; RetNum: DBINT): Pointer;
function dbRetLen(dbProc: PDBPROCESS; RetNum: DBINT): DBINT;
function dbRetType(dbProc: PDBPROCESS; RetNum: DBINT): DBINT;
We are still not able to execute stored-procedures with FreeTDS
Best practice for later "prepare refactoring" would be to have all of these http://technet.microsoft.com/en-us/libr ... 80%29.aspx function available.
Any ideas? Do you know why?
http://docwiki.embarcadero.com/Librarie ... mitUpdates
Bogdan, something else:
Could you please recompile FreeTDS? With the bcp_functions(i'll implement the batch insartiation later) and it would be nice to get the three missing functions running:
function dbRetData(dbProc: PDBPROCESS; RetNum: DBINT): Pointer;
function dbRetLen(dbProc: PDBPROCESS; RetNum: DBINT): DBINT;
function dbRetType(dbProc: PDBPROCESS; RetNum: DBINT): DBINT;
We are still not able to execute stored-procedures with FreeTDS
Best practice for later "prepare refactoring" would be to have all of these http://technet.microsoft.com/en-us/libr ... 80%29.aspx function available.
Any ideas? Do you know why?
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
Re: TZAbstractDataset.CommitUpdates
Hi Michael,
Yes it's seems that PostUpdates is not the right direction, but also CancelUpdates is not ok, i think there should be DisposeCachedUpdates (in order to only free the cached rows). If you work in AutoCommit, than ApplyUpdates call PostUpdates which copy data and free cached rows. When you are not in AutoCommit only copy data from cache and doesn't free cached rows.
For FreeTDS i see that the functions are ok, i will try to export and recompile the library.
All the best,
Bogdan
Yes it's seems that PostUpdates is not the right direction, but also CancelUpdates is not ok, i think there should be DisposeCachedUpdates (in order to only free the cached rows). If you work in AutoCommit, than ApplyUpdates call PostUpdates which copy data and free cached rows. When you are not in AutoCommit only copy data from cache and doesn't free cached rows.
For FreeTDS i see that the functions are ok, i will try to export and recompile the library.
All the best,
Bogdan
Re: TZAbstractDataset.CommitUpdates
@rautgigi,
Maybe this?
http://fossies.org/linux/privat/
http://fossies.org/linux/privat/freetds ... 12.tar.gz/
Michal
Could you try it with the newer version of the source?rautgigi wrote: For FreeTDS i see that the functions are ok, i will try to export and recompile the library.
Maybe this?
http://fossies.org/linux/privat/
http://fossies.org/linux/privat/freetds ... 12.tar.gz/
Michal