Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid Looses Connection to Data when ...
Message
De
22/07/2008 14:29:05
 
 
À
22/07/2008 10:40:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows NT
Database:
MS SQL Server
Divers
Thread ID:
01333147
Message ID:
01333254
Vues:
13
Thanks Beth you got me pointed in the right direction and I was able to solve my problem.

>Hi Robert,

>Have you looked at issuing a grid.sourcecontrol = "" and then assigning the new view after getting the data? You need to put the "", before you do anything to the view.

>HTH
>Beth

>>I've created a form that contains a grid which obtains its data from a remote view. When the form opens, the DataEnvironment pre-opens the view and the grid is automatically populate with the correct data. This, of course, is what I want. However, on some occassions the data is not available from our primary production server and I need to pull it from the archive server (the structure of the tables in either database is the same).
>>
>>Therefore, I have placed a command button on the form that allows the user to change the data source. When you click on the button, the code SELECTs the original view and reissues the USE command for the same view with a CONSTRING pointed to the same table in the archive database. This works; as far as pulling the data but the grid goes blank and is not repopulated with the new data. I issued thisform.grid.refresh() / thisform.refresh() statements but the grid is still blank (i.e., no data - not even the gridlines).
>>
>>I assume this issue is probably related to data binding in some way which I have only a vague understanding of. Can anyone tell me how to re-establish the relationship between the new view (from the archive table) and the previuosly created grid? I know I could create another duplicate form for processing archive data vs. the production data but I was trying to avoid have two forms that were vitually identical.
>>
>>Thanks,
>>Robert Wright
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform