How to know the number of affected rows using the command Ex

Post Reply
artu01
Posts: 306
Joined: Fri May 11, 2007 8:20 pm
Location: Lima

How to know the number of affected rows using the command Ex

Post by artu01 »

Hi guys:

I want to capture the affected rows after using the command execute

Code: Select all

  cSQL := " insert into detguiad (codusu, numero, articu, cantid, precio, total, subart, igv, totfac, mts) "  
  cSQL += " select codusu, numero, articu, cantid, precio, total, subart, igv, totfac, mts from #ppru "  
  Try
      oConnect:Execute( cSQL )
  Catch
      MsgInfo( "fallo en la insercion de detalle" )
  End try

 
Thanks
fwh 17.12, harbour 3.2.0, pelles C, bcc7, Ms-Sql
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: How to know the number of affected rows using the command Ex

Post by nageswaragunupudi »

If you are asking about ADO

Code: Select all

nRecs := 0
oCn:Execute( cSql, @nRecs )
? nRecs
 
Regards

G. N. Rao.
Hyderabad, India
byron.hopp
Posts: 254
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA
Contact:

Re: How to know the number of affected rows using the command Ex

Post by byron.hopp »

Thank you Mr. Rau,

I found the wrong answer on "Stack Overflow".
I think the smart guys are over here.

Byron ...
Thanks,
Byron Hopp
Matrix Computer Services
Post Reply