Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Looses Connection to Data when ...
Message
From
22/07/2008 10:25:37
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Grid Looses Connection to Data when ...
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows NT
Database:
MS SQL Server
Miscellaneous
Thread ID:
01333147
Message ID:
01333147
Views:
70
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
Next
Reply
Map
View

Click here to load this message in the networking platform