ExecuteNonQuery returns -1 for SqlServer and 0 for MySql

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for universal data access
Post Reply
idem84
Posts: 50
Joined: Thu 04 Apr 2013 19:12

ExecuteNonQuery returns -1 for SqlServer and 0 for MySql

Post by idem84 » Fri 15 Aug 2014 14:45

Hi
I have a question for specific commandtexts ("truncate table" detected) and different providers result in ExecuteNonQuery...

Sample code:

...
uniCommand.CommandText="truncate table anytable"
var res = uniCommand.ExecuteNonQuery(); //Works ok, but return value of -1 if provider is SqlServer; and returns 0 if provider is MySql
...

Thanks in advance

Pinturiccio
Devart Team
Posts: 2192
Joined: Wed 02 Nov 2011 09:44

Re: ExecuteNonQuery returns -1 for SqlServer and 0 for MySql

Post by Pinturiccio » Mon 18 Aug 2014 10:51

We have reproduced the issue. We will investigate it and post here about the results as soon as possible.

Pinturiccio
Devart Team
Posts: 2192
Joined: Wed 02 Nov 2011 09:44

Re: ExecuteNonQuery returns -1 for SqlServer and 0 for MySql

Post by Pinturiccio » Wed 03 Sep 2014 12:35

We have fixed the bug with returning 0 instead of -1 for all statements except UPDATE, DELETE, INSERT statements with MySQL. We will post here when the corresponding build of dotConnect Universal is available for download.

Pinturiccio
Devart Team
Posts: 2192
Joined: Wed 02 Nov 2011 09:44

Re: ExecuteNonQuery returns -1 for SqlServer and 0 for MySql

Post by Pinturiccio » Thu 04 Sep 2014 14:14

New build of dotConnect Universal 3.50.736 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/univer ... nload.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?t=30320

Post Reply