[V4MD] Commit cursor changes to DB

mo mo.ritz at gmx.de
Wed Oct 27 11:01:05 CDT 2004


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?

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
> -------------------------------------------------------------
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
>



More information about the Valentina mailing list