Problems with V4RB have me beat.
Ruslan Zasukhin
sunshine at public.kherson.ua
Mon Aug 23 13:36:09 CDT 2004
On 8/10/04 10:35 AM, "Barney" <barney at custombased.com> wrote:
> Hi Ruslan,
>
> Thank you for your time.
Hi Barney,
Look on this your code
//Edges W1
cur1 = app.db.SqlSelect( "select * from Componants WHERE Componant = '"
+ Cs(Loop1) + "' AND tag = 'Edges X' " ) // Should only be the present
working module in there anyway.
Cur2.field("Edges_X").setstring( DataOrResult(cur1) )
//Edges W2
cur1 = app.db.SqlSelect( "select * from Componants WHERE Componant = '"
+ Cs(Loop1) + "' AND tag = 'Edges X2' " ) // Should only be the present
working module in there anyway.
Cur2.field("Edges_X2").setstring( DataOrResult(cur1) )
---------------------
It can be danger and cause problems because you DO NOT kill curs1
But assign to it new instance.
This is all right from point of view REALbasic and Garbage collection.
This CAN BE not right, from point of view record locks.
Let curs1 in line W1
lock record with RecID = 100
Let you start build cursor in line W2.
If this cursor ASLO will try to lock record RecID = 100
Then it will fail, because curs1 still is live.
If you kill cursor curs1 explicitly then NO PROBLEMS.
Second time you can lock that records.
You see?
This is not a problem in this your function,
Just danger code and danger habit.
Always think about allocated resources!
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina
mailing list