Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid can't find SQL Cursor
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00304561
Message ID:
00305953
Views:
29
Thanks Petras, it's good to hear from another Aussie!

I have found over the weekend, that by removing all reference to the SQL generated Cursor in the Column and Textbox objects, that the grid does work fine as long as the fields are in the correct order in the query - which is not a problem. Whereas in VFP5, I sometimes found that the Column widths reset themselves to default without the controlsource property set, this does not seem to be the case in VFP6. I'm not sure how your suggestion would work as if there is a reference to the alias in the column or textbox, wouldn't that cause the same error on initialisation even if the column.controlsource was set to ' '?

David

>Hi, I found that the best method of dealing with "SQL" grids in VFP6 is to set the Grid.RecordSource to ' ' (a single space character) while setting the individual columns ControlSource to the required alias.field. Then when I am ready to display data, I set the RecordSource to the SQL statement and issue a Refresh.
>
>Hope that helps.
>
>>But it seems to me that in 6 the column initialises before the grid and if the cursor is referred to either in the column or a textbox in the column, then an error occurs. This means that columns either have to be set programatically or else the order of fields in the cursor must correspond to the fields I wish to display in the grid, because the column.controlsource and column.textbox.controlsource are empty and the grid fills directly from the grid.recordsource
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform