On Sunday, April 17, 2011 10:02:02 am bluewin wrote:
> I try to learn the basics of dabo. I use the tutorial.sqlite DB. I have a
> form with a grid and a TextBox, that is bound to the stree1-field of the
> clients table.
> 
> Here is the content of AfterInitAll of the Form
> 
>          self.Application.addConnectFile("con_grid.cnxml")
> 
>          conn = self.Application.getConnectionByName("con_grid_na")
> 
>          biz = dabo.biz.dBizobj(conn)
> 
>          self.gridClient.DataSource = biz
> 
>          self.tbStreet1.DataSource = biz
> 
>          self.addBizobj(biz)
> 
>          biz.DataSource = "clients"
> 
>          biz.KeyField = "pkid"
> 
>          biz.UserSQL = """select clientname, street1, city
> 
>                    from clients"""
> 
>          biz.requery()
> 
> The content of the onHit-event of the save-button ist: self.Form.save()
> 
> I use the TextBox to change the street of one record. With or without using
> the save-button, when I move to another record I see the changed record in
> the grid. After that I close the application and restart the application
> and the changes are gone. Why? What should I change to make changes
> permanent?

Two explanations. One, the transaction is not being committed, in other words 
the save is not really happening.  Code showing where the save is being done 
would be helpful. Two, given that this is Sqlite, you are not connecting to the 
database you think you are. Make sure there is not more than one copy of 
tutorial.sqlite lying around. It would help to see the code for the bizObj as 
well as the connection code.

> 
> 
> 
> Greeting - Reto

-- 
Adrian Klaver
[email protected]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to