[V4MD] Commit cursor changes to DB

mo mo.ritz at gmx.de
Tue Oct 26 22:15:52 CDT 2004


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

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,
>
> cheers,
> mo
.                       .

     Moritz Stefaner
     0179 - 525 21 26
     http://der-mo.net

.                       .
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
>



More information about the Valentina mailing list