Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refreshing a grid after SQL select
Message
From
23/07/2008 14:11:21
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01333466
Message ID:
01333502
Views:
12
This message has been marked as a message which has helped to the initial question of the thread.
>I'm studying the article that Sergey suggested, but one more thing that popped up is this: Why, when the SQL call returns a single record, does the grid now show an impossible number of identical records?
>
>I have checked, and the empty cursor appends one record; when the grid shows on the form, it has row upon row of the same data, as if it has 5,000+ records to show.
>
>Is there a quick way around this?

Something fishy there. The grid's recordsource should be a readwrite cursor, best if created by a Create Cursor command. The only explanation I can imagine at the moment is that your grid's recordsource is a table, while the controlsources for its columns are fields from your cursor, with appropriate alias. It could happen if the expected recordsource for the grid wasn't open when the grid was created, so it would just grab the current alias.

You may need to create the grid's cursor before the grid is created (form's .load() or a method called from there, or some dataenvironment method like BeforeOpenTables).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform