Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Cursor mysteries
Message
From
30/09/2015 19:45:41
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
30/09/2015 19:05:52
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01625276
Message ID:
01625277
Views:
81
This message has been marked as the solution to the initial question of the thread.
>I'm converting some dbf's to SQL Server tables.
>In several cases, I have to replace the dbf as a recordsource of a grid with a cursor created by reading from a SQL table.
>I set the cursor name as the recordsource property of the grid, set the column names as the controlsource properties of the columns.
>When I show the form instead of showing the named columns column1 in the grid shows the contents of column 1 in the cursor, etc, etc.
>As a workaround, I changed the query so that things work, but that will not work in every case.

Seems like the alias is not open when the grid instantiates. Or it was recreated after the grid already caught it, i.e. closed then re-created. You may use the so-called 'soft select' technique, to have the cursor created in code, then zapped and filled from the query's cursor whenever necessary. That way the grid's cursor is not closed and re-created and the grid doesn't rebuild.

back to same old

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

Click here to load this message in the networking platform