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

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

Postby artu01 » Tue Jan 14, 2020 5:59 pm

Hi guys:

I want to capture the affected rows after using the command execute
Code: Select all  Expand view  RUN

  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
artu01
 
Posts: 400
Joined: Fri May 11, 2007 8:20 pm
Location: Lima

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

Postby nageswaragunupudi » Tue Jan 14, 2020 8:13 pm

If you are asking about ADO

Code: Select all  Expand view  RUN

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

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10651
Joined: Sun Nov 19, 2006 5:22 am
Location: India

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

Postby byron.hopp » Wed May 27, 2020 7:21 pm

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
byron.hopp
 
Posts: 382
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 80 guests