Re: [gnome-db] gda_data_model_commit.



On Tue, 2005-01-18 at 12:30 -0600, Daniel Espinosa wrote:
> Some mails before I talk about How to Update Data.
> 
> Now I update a Row in a GdaDataModel, and using
> begin_update and end_update, the DataModel is updated.
> 
> But now the values in the data bases is not updated.
> 
> How Do I do it? I have a PostgreSQL provider.
> 

For the Postgres provider, appending records to the data model and
updating records in the data model, will result in updating the data in
the database. A requirement is that at least one of your columns is a
unique index/key. At the moment I am working on getting remove to work.
Hopefully I can post that patch today.

An example of how I use update in my code:

 gda_data_model_begin_update(dm);
 retStatus = gda_data_model_update_row(dm, dmRow);
 if (retStatus == FALSE)
 {
                gda_data_model_cancel_update(dm);
                return 70020;
 }
 gda_data_model_commit_update(dm);


Hope this helps.



> In other point:
> The functions gda_data_model_commit* aren't in the 1.2
> branch, true?
> 

In the 1.2 branch it is called gda_data_model_end





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]