Locks

Thomas Flemming tf at ttqv.com
Sun Nov 1 11:19:02 CST 2009


Hi,

I'm just wondering if this is correct:

I have multiple forms displaying data of the same table.
For this I use several cursors like this, which are open the whole until the 
program ends:

mCur = mDB.SqlSelect(mSQL, kClientSide, kNoLocks, kRandom)

This works.


To edit some values in the table I temporarily create a new cursor:

cur = mDB.SqlSelect("select * from [mytable], _
                     kServerSide, kReadWrite, kForwardOnly)
cur.Position = position_to_edit
cur.Field(1).Value = newvalue1
cur.Field(2).Value = newvalue2
cur.UpdateRecord()
cur.Dispose()

It also works, but is it the right way?

Regards
Tom




-- 
/****************************************
**   Dipl.-Ing. Thomas Flemming
**   Software Development
**
**   Touratech AG
**   Auf dem Zimmermann 7-9
**   D-78078 Niedereschach
**
**   mail  tf at ttqv.com
**   fon   +49 (0) 7728 9279-206
**   fax   +49 (0) 7728 9279-29
**
**   http://www.ttqv.com
**   http://www.touratech.de
**
**   ... und immer dem Pfeil nach!
***************************************/


More information about the Valentina mailing list