[V4MD] Commit cursor changes to DB

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Oct 27 13:56:57 CDT 2004


On 10/27/04 12:01 PM, "mo" <mo.ritz at gmx.de> wrote:

> Hi,
> 
>> Why you use UpdateAll() ?
>> 
>> As far as I see you SELECT exactly one record,
>> Because you do WHERE RecID="+RecID
>> 
>> So you should use just curs.updateRecord()
> 
> I also tried it with curs.updateRecord(), the problem remains...
> hmmm...
> 
> further ideas?

I'd say that problem with record locks, but you say you have set ReadWrite.

What cursor you use? ServerSide or ClientSide ?
ClientSide always is READ ONLY.
Check this point


> Cheers!
> mo
> 
> 
> .                       .
> 
>    Moritz Stefaner
>    0179 - 525 21 26
>    http://der-mo.net
> 
> .                       .
> On 27.10.2004, at 08:23, Ruslan Zasukhin wrote:
> 
>> On 10/26/04 11:15 PM, "mo" <mo.ritz at gmx.de> wrote:
>> 
>>> Hi,
>>> 
>>> update on this: I was so stupid and forgot to create the cursor with
>>> the additional flag to set it to read and write.
>>> 
>>> Now it works... partially ;) The next problem I encounter is that when
>>> I call the saveConfiguration function for the second time, it won't
>>> work. If I trace the cursor after the update, I see the changes. If I
>>> reselect the same query after that, all field values are aas they used
>>> to be before the update.
>>> 
>>> Any Ideas?
>>> 
>>> Valentina gives no error message, btw., neither when creating the
>>> cursor nor when updating.
>>> 
>>> It would be great if someone could help me out here..
>> 
>> Why you use UpdateAll() ?
>> 
>> As far as I see you SELECT exactly one record,
>> Because you do WHERE RecID="+RecID
>> 
>> So you should use just curs.updateRecord()
>> 
>>> Cheers!
>>> mo
>>> 
>>> .                       .
>>> 
>>>    Moritz Stefaner
>>>    0179 - 525 21 26
>>>    http://der-mo.net
>>> 
>>> .                       .
>>> On 26.10.2004, at 17:10, mo wrote:
>>> 
>>>> Hi,
>>>> 
>>>> I recently started to sort out Valentina & Diretcor, so this is a
>>>> very basic question. What is the general modus operandi to store
>>>> cursor changes in the actual db? What I do right now is:
>>>> 
>>>> saveConfiguration = function(o){
>>>>   var RecID=o.RecID; delete o.RecID;
>>>>   trace("Model.saveConfiguration ");
>>>>   var c= _global.gDBManager.getDBCursor( "SELECT * FROM
>>>> configurations
>>>> WHERE RecID="+RecID);
>>>>   var r=c.updateAllRecords(o.toPList());
>>>>   _global.gDBManager.DBInstance.flush();
>>>> }
>>>> 
>>>> but the data is not stored in the database. If I trace the cursor
>>>> after the updateAllRecords command, the values are changed, however
>>>> only in the cursor as it seems.
>>>> 
>>>> Could someone be so kind and shed some light on this?
>>>> Much appreciated,


-- 
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