FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Obtain the results of an UPDATE Sql Query ( ado )
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM

Obtain the results of an UPDATE Sql Query ( ado )

Posted: Mon Mar 24, 2014 02:49 PM
To All

I have a simple Update Sql query .. I was just curious if there were a way to return the number of records changed
by the Update?

Thanks
Rick Lipkin

Code (fw): Select all Collapse
cSql := "UPDATE [Customer] "
cSql += "SET [StaffEid] = "+ltrim(str(nAeNewEid))+", [AccountExecutive] = '"+cAeNew+"' "
cSql += "WHERE [StaffEid] = "+ltrim(str(nStaffEid))

oCn:Execute( cSql )


Posts: 1088
Joined: Fri Oct 07, 2005 03:33 PM

Re: Obtain the results of an UPDATE Sql Query ( ado )

Posted: Mon Mar 24, 2014 03:12 PM
Hola,

search for

Code (fw): Select all Collapse
OleDbCommand.ExecuteNonQuery


saludos

Marcelo
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: Obtain the results of an UPDATE Sql Query ( ado )

Posted: Mon Mar 24, 2014 05:38 PM
Rick,

Rick Lipkin wrote:To All

I have a simple Update Sql query .. I was just curious if there were a way to return the number of records changed
by the Update?

Thanks
Rick Lipkin

Code (fw): Select all Collapse
cSql := "UPDATE [Customer] "
cSql += "SET [StaffEid] = "+ltrim(str(nAeNewEid))+", [AccountExecutive] = '"+cAeNew+"' "
cSql += "WHERE [StaffEid] = "+ltrim(str(nStaffEid))

oCn:Execute( cSql )


Try

Code (fw): Select all Collapse
? oCn:Execute( cSql )


EMG

Continue the discussion