Win32ole adodb.command AffectedRows howto?


I've been trying something along these lines:

connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=#{MDB_FILE};Persist Security Info=False"
oconn ='ADODB.Connection')

#(this works fine so far)

sql = 'update mytable set field1="test" where ID=1'
ocmd ='ADODB.Command')
ocmd.CommandType = ADCMDTEXT
ocmd.ActiveConnection = oconn
ocmd.CommandText = sql

#(now, we need a return value, according to spec.
#Also relevant:

affectedrows= 0

# (great, returns without errors, now let's check our integer

puts affectedrows

Result: cannot seem to get the number of updated rows back.
I did a few experiments with ADODB.Connection and its Execute method,
get a result back, either. I've done numerous searches for this little
detail, no luck - I'm stumped.

I'd be most grateful to hear back from anyone who has found a way to
return these integers back through winole32.

Thanks a bunch,



Posted via