HI,
How I can eliminate of my cursor an object. I erase an object and want that it is reflected in the cursor, I don't to return to consult the DataBase
***************
Dim rc As CRetrieveCriteria
Dim t As New TipoPorte
Dim cursor As CCursor
t = New TipoPorte
rc = New CRetrieveCriteria
rc.ReturnFullObjects = True
cursor = rc.perform(t)
.........
..........
tp.Delete() ' Object of the cursor
The cursor has the same objects. When your delete objects, delete of the cache or not.
Saludos
Victor (Madrid - Espaa)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
All persistent object operations (retrieve, save, delete) work directly against objects in the database.
Objects instantiated via a retrieve criteria are disconnected from the originating recordset and will update the database directly when save and delete are called, not the recordset.
A recordset in a cursor is a readonly snapshot of the database at that point in time. The only way to update the recordset is to do it manually or call perform() again.
Out of curiosity, what are you doing that requires you to update the recordset after deletion?
- Richard.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a cursor of objects in memory and visualize them in a datagrid, when I erase an object want that it is reflected in the datagrid, but I do not want to return to recover of the base of information. They are many records in the datagrid and it is not ideal to recover again all the records.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I don't have a simple/quick answer for you on this one. Could you post a request (RFE) so that the job is on my to-do list and I will see what I can do to solve the problem.
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
HI,
How I can eliminate of my cursor an object. I erase an object and want that it is reflected in the cursor, I don't to return to consult the DataBase
***************
Dim rc As CRetrieveCriteria
Dim t As New TipoPorte
Dim cursor As CCursor
t = New TipoPorte
rc = New CRetrieveCriteria
rc.ReturnFullObjects = True
cursor = rc.perform(t)
.........
..........
tp.Delete() ' Object of the cursor
The cursor has the same objects. When your delete objects, delete of the cache or not.
Saludos
Victor (Madrid - Espaa)
Hi Victor,
All persistent object operations (retrieve, save, delete) work directly against objects in the database.
Objects instantiated via a retrieve criteria are disconnected from the originating recordset and will update the database directly when save and delete are called, not the recordset.
A recordset in a cursor is a readonly snapshot of the database at that point in time. The only way to update the recordset is to do it manually or call perform() again.
Out of curiosity, what are you doing that requires you to update the recordset after deletion?
- Richard.
I have a cursor of objects in memory and visualize them in a datagrid, when I erase an object want that it is reflected in the datagrid, but I do not want to return to recover of the base of information. They are many records in the datagrid and it is not ideal to recover again all the records.
Hi Victor,
I don't have a simple/quick answer for you on this one. Could you post a request (RFE) so that the job is on my to-do list and I will see what I can do to solve the problem.
Thanks.