Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multiuser app, second instance losing grid bindings
Message
 
 
To
20/11/2008 01:56:01
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01361877
Message ID:
01363187
Views:
12
>I tested an old system and it is working fine.
>
>Grid RecordSource is set to "CaseSQL"
>
>The initialize function in LOAD method of the form is:
>
>
>Select * from Event Where .F. into Cursor CaseSQL READWRITE NOFILTER       && create blank cursor
>
>Select * from Event Into Cursor CaseSQL_X NOFILTER                                        && Get new values for cursor
>
>Select CaseSQL
>ZAP                                                                                                                  && clear out cursor
>Append From CaseSQL_X                                                                                  && append new records
>Use in CaseSQL_X                                                                                             && destroy temp cursor
>
>
>Subsequent requeries use the same method of Selecting into a temp cursor (CaseSQL_X) and zapping and appending into the CaseSQL cursor.
>

Hi Ken,

This line

>Append From CaseSQL_X && append new records

should be

APPENF FROM DBF('CaseSQL_X')

Or to avoid the whole problem just use
insert into CaseSQL select * from CaseSQL_X
This is much simpler code and not prone to this error.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform