Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
USE dbf from EXE file
Message
From
09/08/2016 13:43:43
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01639246
Message ID:
01639260
Views:
65
>>>Yes, it could be it. I have this USE and then LOCATE command right after. I thought that the window/prompt I see was generated by the USE command. But it could be that it was generated by the LOCATE command. Thank you!
>>>
>>>But now I am wondering. I already changed my code to use CREATE CURSOR and then APPEND FROM ("MyTable"). Is this better than USE directly?
>>
>>No, it's not better since it's a few more steps. IOW, an unnecessary workaround.
>>
>>In your case, I would select the work area first, and skip "In 0". This code will behave just like you want, as far as I understand:
>>
>>
Select 0
>>Use My_table
>>Locate...
>>
>
>Thank you.

Or even simpler, only one line:
Select * from My_table where YourCondition into Cursor yourCursor
Depending on what I want, I often use "Into array laDummy" instead of "into Cursor yourCursor".

>>>>Just a wild guess... Could it be that you forgot to Select the work area after the Use command? "IN 0" doesn't select the work area, the work area will remain what it already was.
>>>>
>>>>>Thank you. Something is not working in my app. When I create a cursor and then APPEND from the DBF included in the .EXE, everything works. The cursor is filled with the data from the DBF. But when I try to USE, it does not work. I have to go with the APPEND then.
>>>>>
>>>>>>No, .DBF is default extension when none is specified
>>>>>>
>>>>>>>This is what I thought too but I get a window/dialog prompting me to find/select the .DBF file. Should the extension .DBF be included in the USE expression?
>>>>>>>
>>>>>>>>Yes, it'll work. Even if you specify any path, DBF from exe will be open anyway.
>>>>>>>>>
>>>>>>>>>If I want to open a DBF included in the EXE, should the following code work:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>USE MY_TABLE IN 0 ALIAS MY_TABLE
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>Or I have to "indicate" somehow that the .DBF is in the EXE?
>>>>>>>>>
>>>>>>>>>TIA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform