Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

tdbc::odbc: get count of deleted records

71 views
Skip to first unread message

Harald Oehlmann

unread,
Jan 22, 2013, 2:42:57 AM1/22/13
to
Using tclodbc, a "db {delete from table where state = 'old'}" would
return the number of deleted records.

With tdbc::odbc, a "db allrows {delete from table where state =
'old'}" returns nothing.

Is there any way to get the delete count ?
Or did I miss something ?

Thank you,
Harald

Kevin Kenny

unread,
Jan 26, 2013, 7:08:36 PM1/26/13
to
The 'rowcount' method on the (empty) result set should return this.

'allrows' doesn't have a syntax to do it, so you have to go through
creating a statement and a result set.
--
73 de ke9tv/2, Kevin

Harald Oehlmann

unread,
Jan 28, 2013, 2:29:06 AM1/28/13
to
Brilliant Kevin,
I will try.

Thank you,
Harald

Harald Oehlmann

unread,
Jan 29, 2013, 12:05:32 PM1/29/13
to
I tried it today and it works:

% set s [::odbc::db prepare "delete from lookup where Article='AQ3B'"]
::oo::Obj62::Stmt::10
% set r [$s execute]
::oo::Obj81::ResultSet::1
% $r columns
% $r rowcount
1
% close $s
0 new messages