Board index » delphi » ADO -> Lock Record on Edit
Ricardo Hidalgo
![]() Delphi Developer |
Mon, 28 Apr 2003 03:00:00 GMT
|
Ricardo Hidalgo
![]() Delphi Developer |
Mon, 28 Apr 2003 03:00:00 GMT
ADO -> Lock Record on Edit
I can lock a record when making an Edit?
|
Guy Smith-Ferrie
![]() Delphi Developer |
Mon, 28 Apr 2003 03:00:00 GMT
Re:ADO -> Lock Record on EditRicardo, Quote>I can lock a record when making an Edit? Guy. |
Ricardo Hidalg
![]() Delphi Developer |
Mon, 28 Apr 2003 03:00:00 GMT
Re:ADO -> Lock Record on EditHello Guy. I have read your latest messages and I haven't arrived to any conclusion... Thanks Guy Smith-Ferrier <guysm...@compuserve.com> escribi en el mensaje de Quote> Ricardo, |
Jumbo Dumb
![]() Delphi Developer |
Mon, 28 Apr 2003 03:00:00 GMT
Re:ADO -> Lock Record on EditQuote"Ricardo Hidalgo" <rhida...@md-etiquetado.com> wrote in message Quote> Could you please give me some explanation about how lock a record while ADOExpress modifies the standard ADO record locking scheme in that it applies the Except for desktop applications developed by converted xBase and Paradox programmers, You can use either semaphores or added fields kluges to simulate pessimistic record Add to your unit this generalized pessimistic record locking function for Access function ApplyLockBeforeEdit(DataSet: TDataSet): boolean; In each BeforeEdit event you must call the function. procedure TForm1.ADOTable1BeforeEdit(DataSet: TDataSet); Duh, that wasn't too hard was it?<g> Regards, |
Guy Smith-Ferrie
![]() Delphi Developer |
Mon, 28 Apr 2003 03:00:00 GMT
Re:ADO -> Lock Record on EditRicardo, Quote>Could you please give me some explanation about how lock a record while InternalEdit or BeforeEdit isn't reliable because the underlying recordset can be used to retrieve more data and, if it is, then the lock is released. Guy. |
Jumbo Dumb
![]() Delphi Developer |
Mon, 28 Apr 2003 03:00:00 GMT
Re:ADO -> Lock Record on EditQuote"Guy Smith-Ferrier" <guysm...@compuserve.com> wrote in message Quote> I don't know of any reliable way to do this. Forcing a record lock in you must explicitly release the lock if the edit is canceled. Use a global var for the cloned recordset and do a cancelupdate on the clone in the before cancel event. It gets a little messy but it surely can be done. Jumbo |
Guy Smith-Ferrie
![]() Delphi Developer |
Tue, 29 Apr 2003 03:00:00 GMT
Re:ADO -> Lock Record on EditJumbo, Quote>It's possible, just clone the cursor and make the lock on the cloned cursor. Guy. |
Ricardo Hidalg
![]() Delphi Developer |
Tue, 29 Apr 2003 03:00:00 GMT
Re:ADO -> Lock Record on EditThank you Jumbo. I have another question: The function ApplyLockBeforeEdit can work with another database system, such Is it simply necessary to change the Provider? Thank you again. :-> Jumbo Dumbo <b...@nyett.com> escribi en el mensaje de noticias Quote
|
Jumbo Dumb
![]() Delphi Developer |
Tue, 29 Apr 2003 03:00:00 GMT
Re:ADO -> Lock Record on EditQuote"Ricardo Hidalgo" <rhida...@md-etiquetado.com> wrote in message Quote> The function ApplyLockBeforeEdit can work with another database system, such Access. Jumbo |
Wilso
![]() Delphi Developer |
Wed, 28 May 2003 10:05:48 GMT
Re:ADO -> Lock Record on Editdear Jumbo Dumbo i'm using MSSQL 7 and try your procedure / fuction but it still could not thanks Quote"Jumbo Dumbo" <b...@nyett.com> wrote in message Quote
|
Jumbo Dumb
![]() Delphi Developer |
Thu, 29 May 2003 01:17:37 GMT
Re:ADO -> Lock Record on EditQuote"Wilson" <wil...@email.com> wrote in message Quote> dear Jumbo Dumbo As for the explaination, please carefully read from below that As an aside, you shouldn't be trying to do pessinistic locking on relational Regards, Quote> > locking or just use the following suggestion which will apply a native |
1. ADO Record locking / locked by
2. lock records (pessimistic lock) using D5 Access 2k ADO
3. lock records (pessimistic lock) using D5 Access 2k ADO
4. Record locking with ADO Express, ADO 2.5 and Access 2000 .mdb files
5. Pessimistic Locking -> Cannot edit fields
6. ADO-Access2000-Multiuser-Edit Locking?
7. Detecting a Lock record (not a lock table but the record)
8. Help! Record locked - Not in Edit Mode