Re: [SOCI-users] How to check if SQL delete from deleted anything?

2012-05-07 Thread Vadim Zeitlin
On Thu, 3 May 2012 23:43:18 +0100 Neil Morgenstern neil.morgenstern.2...@gmail.com wrote: NM Ok, my SQL isn't that expert but to find out how many were deleted you NM might: NM - SELECT @@ROWCOUNT as NumDeleted together with your delete statement which NM would give you the number of rows

Re: [SOCI-users] How to check if SQL delete from deleted anything?

2012-05-03 Thread Neil Morgenstern
We had to modify the odbc error in our code to make it more descriptive, i.e. actually give the error message in the what() text. I've never been that fond of the use of the type system in C++ exceptions and prefer to throw standard ones like std::runtime_error pretty much every time. The user

Re: [SOCI-users] How to check if SQL delete from deleted anything?

2012-05-03 Thread Vadim Zeitlin
On Thu, 3 May 2012 12:08:29 +0100 Neil Morgenstern neil.morgenstern.2...@gmail.com wrote: NM We had to modify the odbc error in our code to make it more descriptive, NM i.e. actually give the error message in the what() text. Hello Neil, This looks like a good idea in its own right but I'm

[SOCI-users] How to check if SQL delete from deleted anything?

2012-05-02 Thread Vadim Zeitlin
Hello, I'm just starting to use SOCI so sorry in advance if I'm missing something obvious but is there any way to detect if a delete SQL statement affected any rows? I thought that got_data() would return false if it didn't delete anything but at least with the ODBC backend this is not the case