TDataRow and ADO questions

Re: TDataRow and ADO questions

Postby nageswaragunupudi » Tue Jun 18, 2013 4: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
User avatar
nageswaragunupudi
 
Posts: 10632
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: TDataRow and ADO questions

Postby Enrico Maria Giordano » Tue Jun 18, 2013 5: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
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: TDataRow and ADO questions

Postby lucasdebeltran » Mon Jul 01, 2013 4: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: Select all  Expand view
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.
User avatar
lucasdebeltran
 
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am

Re: TDataRow and ADO questions

Postby Marc Vanzegbroeck » Mon Jul 01, 2013 6:50 pm

Try this:
Code: Select all  Expand view
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
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: karinha, nageswaragunupudi and 105 guests