General information
Category:
Forms & Form designer
>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only