Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing from DBC unexpectedly
Message
De
16/04/2007 11:37:19
 
 
À
16/04/2007 11:34:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01216225
Message ID:
01216271
Vues:
13
>>>>>>Hi all, i have a quick question. My program open database "main" from the begining, but for certain process it must use tables on other drive and these tables has other "main" (same name) database attached to. When i finish the process, the local main tables do not show info on screen, until i close all then open again local main data. Something like my local database is c:\data\main.dbc the i must use x:\statistics\orders.dbf and update there some items, then i must return to c:\data\orders.dbf to check changes on local data and no changes are showed. Except when i close all and open again c:\data\main.dbc
>>>>>How can i keep c:\data\orders.dbf items be showed when finish the operation with x:\statistics\orders.dbf?
>>>>>T.I.A.
>>>>
>>>>Could it be just interface problem? For example, you should requery list/comboboxes, refresh grids or requery views to get new data to screen.
>>>>
>>>>Not really, because i must close all aplication to get again the local data. Even in development mode i must close databases all and then open local database to see changes on local, the external data changes are ok too.
>
>>Could you at least Browse your table and see changes without re-opening? If it's the case then you should find a way to show them on screen immediately.
> Yes, i saw it, i can see the data on the table using browse, but even closing the form and opening again it didn't show anything. Here some of the code:
>
>*orders.dbf ->opened by dataenvironment
>if param.cstat=1 &&save statistics
>*check statistics file
> cfi=alltrim(param.ordstatfile)
> if file(cfi)
> use &cfi in 0 alias est_orders
> endif
>endif
>cursorsetprop("Buffering",5,"orders")
>sele orders
>replace dmodi with date(), usmod with suser(), ....
>if used("est_orders") &&apply statistics
> cursorsetprop("buffering",5,"est_orders")
> insert into statistics (nord,date,....) values(num_ord,date(),....)
>endif
>begin transaction
>if tableupdate(1,.T.,"orders")
> end transaction
> if used("est_orders")
> begin transaction
> if tableupdate(1,.t.,"est_orders")
> end transaction
> else
> rollback
> =tablerevert(.T.,"est_orders")
> messageb("Statistics can't be saved",16,"Error")
> endif
> endif
>else
> rollback
> =tablerevert(.T.,"orders")
> messageb("Orders can't be saved",16,"Error")
>endif
>
>What do you use in the form to show the data?

a GRID because this orders table is detail for other table, but i'm just changing exactly the detail. The header is still showing well.
John Harold Belalcázar Lozano
Associate Director Of Development
http://www.belvicto.co/
jhbelalc@gmail.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform