FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to know the number of affected rows using the command Ex
Posts: 400
Joined: Fri May 11, 2007 08:20 PM
How to know the number of affected rows using the command Ex
Posted: Tue Jan 14, 2020 05:59 PM
Hi guys:

I want to capture the affected rows after using the command execute
Code (fw): Select all Collapse
  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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: How to know the number of affected rows using the command Ex
Posted: Tue Jan 14, 2020 08:13 PM
If you are asking about ADO

Code (fw): Select all Collapse
nRecs := 0
oCn:Execute( cSql, @nRecs )
? nRecs
Regards



G. N. Rao.

Hyderabad, India
Posts: 408
Joined: Sun Nov 06, 2005 03:55 PM
Re: How to know the number of affected rows using the command Ex
Posted: Wed May 27, 2020 07: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

Continue the discussion