I guess this method does the trick (judging by your description) but the
fact that it does not exist in ND4 almost confirm that there is no way of
getting the update count out of the data object (otherwise they would not
have introduced this method in ND5, I guess).
Actually it's not surprising that ND5 supports this because it uses JDBC
which specifies that the update count be returned when you execute an
update, insert or delete statement.
Looks like ND4 users like me will have to live with the stored procedure way
of getting around (as suggested by Brendan) until we move to ND5.
-----Original Message-----
From: Ryan Gustafson [SMTP:[EMAIL PROTECTED]]
Sent: Friday, July 09, 1999 12:15 AM
To: [EMAIL PROTECTED]
Subject: Re: [ND] Update Count when updating the database
The CSpDataObject.getRowsAffected() method seems to do the trick. In my
tests it returns -1 if no rows are affected, otherwise the number of rows
affected (I've only ever tested the 1 row case). BTW, I'm using ND 5.0,
so I'm unsure if this is available in older releases.
Be well,
Ryan
Ryan Gustafson wrote:
>
> I'd also like to chime in my interest for knowing this. I needed to do
> this today and was unable to find anything that worked. I tried
> getNumOfRows(), and even checking the vendor error codes. Nothing.
>
> I appreciate any assistance people can provide.
>
> Thanks,
> Ryan
>
> "DARREN KHOO, CUSD" wrote:
> >
> > Does anyone have any idea how to get the update count after executing an
> > updating data object. On the first thought, getNumOfRows() looks like it
but
> > it actually returns the num of rows in the result table, which is
meaning
> > only if you are executing a query.
> >
> > To do a select on the database before updating will mean an extra and
> > unnecessary database call and I have sworn to avoid that at all costs.
If
> > anybody knows of any way to get the update count out of the data object,
> > please point me in the right direction.
_________________________________________________________________________
For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
For dire need help, email: [EMAIL PROTECTED]
_________________________________________________________________________
For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
For dire need help, email: [EMAIL PROTECTED]