dbTalk Databases Forums  

RE: Locking using INNODB

mailing.database.mysql-plusplus mailing.database.mysql-plusplus


Discuss RE: Locking using INNODB in the mailing.database.mysql-plusplus forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Steve Roberts
 
Posts: n/a

Default RE: Locking using INNODB - 06-14-2005 , 01:23 PM






If you use the ResNSel object you can check whether or not the query
succeeded AND how many rows were affected:

(note: from memory, details may not be quite right)

mysqlpp::Query q =3D conn.query();
q << <update of some sort>;
mysqlpp::ResNSel res =3D q.execute();

if (!res || res.rows < 1) {
// query failed
}

Quote:
-----Original Message-----
From: Ger Hayden [mailto:ghayden (AT) iol (DOT) ie]=20
Sent: Monday, June 13, 2005 12:51 PM
To: plusplus (AT) lists (DOT) mysql.com
Subject: Re: Locking using INNODB
=20
We have an element of Pilot error here. The update didnt=20
happen but the query ran successfully updating 0 rows! I need=20
something like Sqlstate or there abouts.
=20
GER
=20
=20
--=20
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: =20
http://lists.mysql.com/plusplus?unsu...) f5 (DOT) com
=20
=20
--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.