Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error 2072 strikes again
Message
De
03/08/2006 02:30:08
 
 
À
02/08/2006 19:42:29
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP1
Database:
Visual FoxPro
Divers
Thread ID:
01142562
Message ID:
01142602
Vues:
14
This message has been marked as a message which has helped to the initial question of the thread.
>I have a cursor I created (by select ... where .f. readwrite), and it's to be the recordsource of a grid on page2 of a pageframe. There's a listbox on page1 where a selection causes the following:
>
>1. a record from the table is loaded into a couple of objects, to be shown on page1
>2. the cursor for the grid is zapped
>3. a bunch of records is inserted into the cursor
>
>Then the user can go to page2. The grid on page2 is in a container which is instantiated on first use.
>
>The 2027 error appears on second or later inserts. The records to be inserted appear in separate cursors in the Data Session view. From what I saw in other threads about this error, it happens when there's a grid with a cursor like this. Now this cursor has no buffering at all, and I've moved the focus off the grid - no luck. Next thing I tried was to simply removeobject(container) from page2 whenever it deactivates, so when this happens the grid actually doesn't even exist. And I'm still getting this error.
>
>I've also tried to unbind the grid (by setting its recordsource to "") before destroying it, no luck. Setting its buffering to 5 then 1 then 5 during this, with tablerevert() etc also doesn't work - still get 2072.
>
>If anyone has more ideas, welcome.

if this work, try to minimize this code until it work
 grid.visible = .f.
 grid.enabled = .f.
 zap
 grid.refresh
 insert ...
 grid.refresh
 grid.enabled = .t.
 grid.visible = .t.
A drastic solution is:
grid.recordsource = grid.recordsource
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform