ExecuteNonQuery returns -1 for SqlServer and 0 for MySql
Posted: 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
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