You are not logged in.
Pages: 1
Hi, there is no overriden UpdateCount method in TOleDBStatement.
I've made a quick hack and it seams to work properly with SQLServer. Not sure though whether it is consistent with your vision. Here is patch made from WinMerge (file SynOleDB.pas based on leaf 672e31903b):
999a1000
> function UpdateCount: integer; override;
1592c1593
< OleDBConnection.OleDBCheck(fCommand.Execute(nil,DB_NULLGUID,fDBParams,nil,nil));
---
> OleDBConnection.OleDBCheck(fCommand.Execute(nil,DB_NULLGUID,fDBParams,@fTotalRowsRetrieved,nil));
1675a1677,1683
> end;
>
> function TOleDBStatement.UpdateCount: integer;
> begin
> if not fExpectResults then
> result := TotalRowsRetrieved
> else result := 0;
regards
dc
Offline
I've added a TOleDBStatement.UpdateCount overriden method from your proposal.
http://synopse.info/fossil/info/1f0ccd0924
A new private field has been used instead of fTotalRowsRetrieved, since this one is used for the "Total" Rows inserted by the statement, even after a reset.
Note that our mORMot ORM does not use this method, so it was not mandatory to have our DB core to work.
Thanks a lot for the feedback, and code proposal!
Offline
Glad I could contribute to your great project
Offline
Pages: 1