Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with Data Path
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00194694
Message ID:
00197760
Views:
19
>I am having difficulty understanding how a form determines the path to a table.
>
>I am running my application from development mode(I choose the main program from within the project and choose run). Each of my forms is finding the tables from the correct path except 1!!
>
>1 form, for some reason, chooses to open up the tables from another computer on the network. If I display how the path is set while in this form is does not even point to this other computer. Where is it that the path is set on the form level?
>
>Any ideas?
>thanks,
>Paul


Paul,

I put this code in the beforeopentables method in my forms that aren't using a database otherwise the path will not be correct. You should be able to do something similar. As a rule, however, I always keep the same directory structure during development as I do at the customer site (if they aren't going to run an exe). The directory structure may be on a different drive and may have a different top level, but the structure from the level that the system is running from on down is kept the same. Subdirectories that the customer doesn't need I leave out.


*\\CBN-SJG 02/21/97 this code assures that the data is coming from the
*-- correct location. The cursorsource propery defaults to the path where
*-- the development was done.

LOCAL lnCt, lcCt

FOR lnCt = 1 TO 10
IF TYPE("THIS.Cursor" + ALLTRIM(STR(lnCt))) == 'O'
*-- is a cursor object
lcCt = ALLTRIM(STR(lnCt))
THIS.Cursor&lcCt..CursorSource = (gcDataPath) + THIS.Cursor&lcCt..Alias + '.dbf'
ENDIF
ENDFOR


Sally
Previous
Reply
Map
View

Click here to load this message in the networking platform