When display " -1 " in rowsAffected , whats mean?

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
juliorosales.ti
Newbie
Posts: 1
Joined: Wed Aug 02, 2017 7:07 pm

When display " -1 " in rowsAffected , whats mean?

Post by juliorosales.ti » Wed Mar 07, 2018 9:53 pm

Hi, please help me .

When display " -1 " in rowsAffected , whats mean?

Let>SQL=DELETE * FROM CUSTOMERS
DBExec>dbH,SQL,rowsAffected

rowsAffected = 1 ok
rowsAffected = 0 ok
rowsAffected = -1 ????

Thanks by answer

User avatar
Marcus Tettmar
Site Admin
Posts: 7378
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: When display " -1 " in rowsAffected , whats mean?

Post by Marcus Tettmar » Mon Mar 12, 2018 2:41 pm

Probably means it failed. But it's going to depend on what kind of database you are using and what driver you are using. DBExec and DBQuery are simply dumb conduits. All they do is pass the sql string on to your driver and return the result that the driver returns to it. So the answer lies in the documentation of your database or the connection driver.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts