On Thu, 3 May 2012 23:43:18 +0100 Neil Morgenstern 
<[email protected]> 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 deleted as a result set.
NM> - Use a stored procedure that does that. Then you come to having to adapt
NM> SOCI to stored procedures. Incidentally we did the outbound parameter
NM> binding with direct SQLBind and not attempting to support it with SOCI.
NM> 
NM> Not sure about the syntax if not using a stored procedure.

 Thanks again for your help, Neil, but I still can't help wondering if all
these complications are really needed. E.g. I'm definitely not going to use
stored procedures just for this, I could simply run a select before a
delete instead. And "@@ROWCOUNT" is interesting but I think it's MS SQL
specific and ideally I'd prefer to keep my code portable to other RDBMS for
as long as I use ODBC backend.

 But mostly I just don't understand why doesn't SOCI use the return code
from SQLExecute() which already contains all the information I need. More I
think about this, more I believe it's just a bug. But I'll try to test with
other backends to see how does it work there to confirm.

 Thanks again,
VZ

Attachment: pgpELF75y9r7y.pgp
Description: PGP signature

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users

Reply via email to