RowsAffected always 0 in update Direct Mode

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
marcogambera
Posts: 1
Joined: Mon 18 Dec 2017 10:34

RowsAffected always 0 in update Direct Mode

Post by marcogambera » Mon 18 Dec 2017 10:51

I was using prNativeClient and all was working.

I switch to pdDirect and i see all update returns 0 row affected

My connection has this settings:

Options.KeepDesignConnected:=True;
ProviderName:='SQL Server';
SpecificOptions.Values['Provider'] := 'prDirect';
SpecificOptions.Values['Authentication'] := 'auServer';
SpecificOptions.Values['ConnectionTimeout'] := '90';
SpecificOptions.Values['LockTimeout'] := '10000';

Example code:
q2.SQL.text:='update cliente set nome=:nome where id=:id';
q2.ParamByName('nome').AsString:=ragsoc;
q2.ParamByName('id').AsInteger:=idclifor;
q2.ExecSQL;

The update is succesfull but q2.RowsAffected is always 0

I'm using Delphi Tokyo Update 1

Stellar
Devart Team
Posts: 496
Joined: Tue 03 Oct 2017 11:00

Re: RowsAffected always 0 in update Direct Mode

Post by Stellar » Fri 22 Dec 2017 14:06

We tested the work of the RowsAffected property on the latest UniDAC version, but found no problems. In order for us to analyze the issue, please provide the script to create the table, as well as a simple sample demonstrating the issue.

Post Reply