Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Looking for advice on best practices.
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00471700
Message ID:
00472260
Views:
49
Hi!

Woops!
Whe I use the same approach in the same data session, it works. When trying to open such file in another data session, it says file is in use... Quite strange, because I always thought that 'AGAIN' option of USE command works across different data sessions...

Well, that use as suggested before - array or data object. Or even put data into temporary table if you can, as suggested by Anthony Letts.

>Tried to implement this option, however, I get file in use error and can not seem to overcome.
>
>Any sugggestions on getting over the issue of file in use?
>>Hi!
>>
>>I just hit into another idea. It might not work, but you can try it.
>>
>>DBF() function returns the file name for cursor. Pass this string into the second form as parameter:
>>
>>DO FORM MyForm WITH DBF('CURSOR1')
>>
>>In the Init of second form open cursor again:
>>lparameters pcMyCursorFile
>>USE (m.pcMyCursorFile) AGAIN ALIAS CURSOR1 IN 0
>>
>>This way you will have near the same cursor, but in another workarea...
>>
>>>In general CURSOR1 will not be that large, however, there no limitations on size. Is there an issue with putting into an array and passing as parameter with respect to size?
>>>
>>>
>>>
>>>>Hi!
>>>>
>>>>If CURSOR1 is not large, you can put it into array and pass array as a parameter for second form.
>>>>
>>>>Another solution is for one record used in CURSOR1. Use SCATTER NAME command to get record values into the object variable. This object will hold all fields of cursor as properties. Than pass that object to the second form as parameter.
>>>>
>>>>>I have CURSOR1 in FORM1's private data session. FORM1 needs to call FORM2 with its own private data session. FORM2 will need to create a CURSOR2 which is based on records available in CURSR1.
>>>>>
>>>>>Question is what the best method to accomplish creating CURSOR2. I am using SPT and because of network traffic, need to come up with the best solution.
>>>>>
>>>>>Thanks in advance for advice and suggestions.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform