FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour TDataRow and ADO questions
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: TDataRow and ADO questions
Posted: Tue Jun 18, 2013 04:08 PM
James Bott wrote:I am not clear on this: if you do a oRS:delete() does it just delete the record in the recordset or does it automatically delete the record in the table on the server too? Or, is the record in the table only deleted when the recordset is updated (oRS:update())?

James

oRs:Delete() marks the current record in the recodset for deletion. Server does not yet know anything.

oRs:Update() ( update() is used to save changes to the server) actually deletes the record on the server.
Regards



G. N. Rao.

Hyderabad, India
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: TDataRow and ADO questions
Posted: Tue Jun 18, 2013 05:00 PM
NageswaraRao,

nageswaragunupudi wrote:oRs:Delete() marks the current record in the recodset for deletion. Server does not yet know anything.

oRs:Update() ( update() is used to save changes to the server) actually deletes the record on the server.


Sorry, but this is not true. oRs:Update() is not required. It could cause unpredictable results.

EMG
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
Re: TDataRow and ADO questions
Posted: Mon Jul 01, 2013 04:52 PM
Hello,

This topic is very useful.

I would like to ask please what is the equivalent to the COUNT FOR in DBF:

Code (fw): Select all Collapse
COUNT FOR FIELD->OTRO=.T. TO nOtro.


Thank you very much. Best regards
Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Re: TDataRow and ADO questions
Posted: Mon Jul 01, 2013 06:50 PM
Try this:
Code (fw): Select all Collapse
oSQL:Query( "select count(*) AS NumberOfRecords from yourtable WHERE OTRO = '1'") )
Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite

Continue the discussion