locks and valentina studio

Danny Lewkin daniel.lewkin at cognosis.be
Wed Nov 14 05:23:29 CST 2007


Op 14-nov-07, om 11:15 heeft Ruslan Zasukhin het volgende geschreven:

> On 14/11/07 11:44 AM, "Danny Lewkin" <daniel.lewkin at cognosis.be>  
> wrote:
>
>> Hey list, Ruslan,
>>
>> while debugging my program, I have a cursor locking a record I
>> selected in a table.
>> If I break my program, after the cursor is created (with lock), I
>> can't view that table anymore with vstudio (not with the data editor,
>> and not with de sql editor). Actually, Vstudio CRASHES if I try to
>> view a table with locked records with the data editor!!)
>> I find this wrong. VStudio is also a debugging tool for me. I RB, I
>> can not see the contents of a cursor, I have to declare variables,
>> and then put the values of the fields in them.
>> This is a lot of extra work, just for debugging. Furthermore, if a
>> field (for example a long field) is NULL, and I would do something
>> like this:
>> intVariable = MyCursor.Field(longfieldname).Value (or .integervalue),
>> intVariable would be 0 (not NULL), because I declared it (dim
>> intVariable as integer).
>> So I can not see, during debugging, what the actual value of that
>> field is, not in RB, and not with VStudio, because the record is  
>> locked!
>>
>> Well, I'm asking for a solution here, and I can think of 3:
>>
>> - making it possible to make a sql SELECT statement in vstudio with
>> the sql editor and showing the results
>
> But you can do this of course right now !!
>
>> - making it possible to open the data editor in a sort of read- 
>> only-mode
>
> Yes, this can be good idea...
>
>> - and the coolest thing would be : changing the RB plugin, so that
>> the contents of a cursor is displayed during debugging (just like a
>> listbox, or dictionary)
>
> Hmm, but what problems again here????
>
> Please look e.g. Into our V4RB examples.
>     we have Example Tools module.
>     it have CursorWindow - the special window which is able display  
> any
> cursor.
>
> But note, it is not best for real life, because listbox of RB is  
> very slow.
> For real life you need to use some tool of Active ListBox, e.g.  
> Bjorn offer
> such and Kem.
>
>
>> I don't know how diffucult this would be to implement, but if any of
>> you at valentina can see it happening, I would be more than happy to
>> put this into mantis!
>
>> If it would be up to me, I even let VStudio override ALL locks, as I
>> would think that someone using VStudio knows what he/she is
>> doing...at his own risk....
>
> The most strange thing for me -- why records stay locked.
>
> * if this db is local - then db must be closed when app stopped
>
> * if this db is under server - then on clien disconnect all his  
> cursors are
> killed and all other stuf related to this client is cleaned up.
>
> So HOW YOU GET locked records ?????

If I'm debugging, en the debugger stops on a breakpoint after a  
cursor with locks, the record is still locked of course, because the  
program is 'on hold' (debugging). The line of code where I set  
MyCursor = Nil is a few lines further... But in meantime, I want to  
see the records of a cursor, but I can't...
So I can step through the program, but I can not see wat the  
fieldvalues in a cursor are...

For example :

I set a breakpoint AFTER a line of code like this :

MyCursor = new VCursor(strQuery, MyDB, EVCursorLocation.kServerSide,  
EVLockType.kReadWrite, EVCursorDirection.kRandom)
(to make an update of that record)

Now would it be very great, if on the right part of the RB debug  
screen (where the variables are visible), I could see something like  
this :

-------------- next part --------------

This is the contents for a listbox, when I'm on a breakpoint. You can  
see all columns and rows, so each cell, and you can see the contents  
of it...
If this would be possible for cursor too, that would be really great.
So a column would be a field, and a row would be a record...
But I can imabine that this would be impossible, or very much work to  
do so...

Greetz,

Danny


>
>
> -- 
> Best regards,
>
> Ruslan Zasukhin
> VP Engineering and New Technology
> Paradigma Software, Inc
>
> Valentina - Joining Worlds of Information
> http://www.paradigmasoft.com
>
> [I feel the need: the need for speed]
>
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina



More information about the Valentina mailing list