Użytkownik enrico secco napisał:
> Hi,
>
> I re-post the problem because of no-subject in the first and because of some 
> news.
> (question: is possible to change, or add, the subject of a post?)
>
> I'm tryng to develop an application but I'm blocked in a crucial point:
> I have 2 database, the first MSSQLSERVER and the second PostgreSQL.
> The first operation the user must do is extract a recordset from a table 
> 'ARCDIPAN' in the MSSQL, select some record, then export the selected records 
> in table 'public.anagrafica' in PostgreSQL.
> To consent to select the records I add a field 'PRESEL' to the extracted 
> record and in the grid I show this value with e boolean editable field. So 
> the user can select the records.
> Than I did re-defined the onSave method in the FrmArcdipan ui class, relative 
> to the extraction table ARCDIPAN, and write the method to getDataSet from the
> biz of the class and try to saveAll in a biztmp defined:
> biztmp = dabo.biz.dBizobj(self.Application.dbConnection, 
> DataSource="public.anagrafica", KeyField="idsessione,coddip")
> where the self.Application.dbConnection is the connection to the PostgreSQL 
> db.
>
> The structure of the original DataSet and the destination DataSet are 
> different so in the method I construct a list (called dsExp) of dictionary, 
> any dictionary with the structure of the destination bizObj and than I try:
> biztmp.appendDataSet(dabo.db.dDataSet(tuple(dsExp)))
> biztmp.saveAll()
>
> To do that I did copy from examples found in this mail-list.
>
> Problem! No record is saved. No error message.
>
> I did try in an other way. I did construct the biz object to write with the 
> class defined by the AppWizard:
> bizExp = self.Application.biz.Public_Anagrafica(self.Application.dbConnection)
> bizExp.appendDataSet(dabo.db.dDataSet(tuple(dsExp)))
> bizExp.saveAll()
>
>    

Hi.

The appendDataSet() method, it doesn't do anything with you data.
Especially, it doesn't toggle *new* row flag required to recognize row 
as modified.
Try to do something like this:

<code>
     cursor = biztmp._CurrentCursor

     def toggleNewFlag():
         cursor.setNewFlag()

     biztmp.scanRows(toggleNewFlag, [list of appended rows])
</code>

Regards
Jacek Kałucki
_______________________________________________
Post Messages to: Dabo-users@leafe.com
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/4d95acb4.7000...@rz.onet.pl

Reply via email to