El 09/08/13 14:49, John Fabiani escribió:
On 08/09/2013 10:25 AM, Ricardo Aráoz wrote:
El 09/08/13 14:06, John Fabiani escribió:
On 08/09/2013 10:01 AM, Ricardo Aráoz wrote:
El 09/08/13 13:23, John Fabiani escribió:
On 08/09/2013 09:11 AM, Ricardo Aráoz wrote:
bizCargar = self.Application.biz.TarjetasBizobj(conn)
ds = bizCargar.getDataSet()
where did you retrieve the data?

Try  bizCargar.requery() to get the data first.


Thanks John, that solved that issue. Now I am getting a data set in ds. I do bizTjtas.appendDataSet(ds) and then when I issue bizTjtas.getDataSet() I am able to see the data set loaded in bizTjtas. But when I do self.save() (this is the command window once the app is running, so self==mainForm) and self.requery() the changes are lost. I issue bizTjtas.getDataSet() and it returns ().
I feel we are getting there. Thanks for your help


Please post your code (complete code please) @ http://dabo.codepad.org/

Johnf

The mainForm code is here http://dabo.codepad.org/2bRUImWI
You will find the non working code in class pnlBotones.onCargarArchivo()
Does this cover it when you say "complete code" or would you rather also have all the other files (bizobj, main, etc)? If you'd rather see the whole project tree (about 3Mb) I could send it to you. Any other suggestion you may come up when you browse through the code will be really welcome.

Thanks


Please keep the list in the loop.

Yes I'd like to see the bizobjs. and where ever you have your " def createBizobjs(self):".

Can I assume that bizCargar and bizTjtas are the same database table?
if so try this
bizCargar  =  self.Application.biz.TarjetasBizobj(conn)
bizCargar.requery()
ds  =  bizCargar.getDataSet()
bizCargar.deleteAll()
bizCargar.appendDataSet(ds)
self.Form.save(dataSource='Tarjetas')
self.Form.requery(dataSource='Tarjetas')
self.Form.GridTarjetas.refresh()
If the above does not work try an .update() (I always forget which is required 
for the grid to display new data).


Of course the above really does nothing but delete and insert the same data 
into the same table.
        
  bizTjtas  =  self.Form.getBizobj(dataSource='Tarjetas')
I believe when you are doing the above - all you are getting is the same table 
with a different reference name.  Why do that just deal with the real table.

In general I would execute a direct sql statement. I'm not really up on sqlite syntax but either a 
"truncate" or "delete all from table" is sure to be available.


Johnf


SQLite stores db's in files. I made a copy of my db file, then I added some info to it and made a second copy of the file. So I have two files with the same db at different moments in time. Now I want to be able to load any of those files into my actual db. So bizTjtas is the main bizobj, that is the file that contains the main db (actual db). And bizCargar is a bizobj that is connected to one of the other copies of the db. So no, bizCargar and bizTjtas are not the same database table, they are connected to different files that contain databases with exactly the same structure and tables but different data in those tables.
I'll try your code right now and let you know.





--- StripMime Report -- processed MIME parts ---
multipart/alternative
 text/plain (text body -- kept)
 text/html
---
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.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