My application may well be used with files on a NAS which are returned in UNC format.
I have a table of previously used paths, some on a NAS.
When I test the selection of a new path gained with getdir()
I have tried both a SEEK on an indexed field (which was not possible because the path could be too long for an index ) and LOCATE
if the selected path is, say
\\NASSERVER209\MYUSERDATA\PROJECTS\__ABC PROJECTS - MINE\MY PROJECT 2010\WETTON_REAL 2010 V7_TESTER\
the code below fails when the path is already in the mypaths table.
So I have tried
Another routine in my application is doing the exact same thing with a LOCATE and this is failing as well.
So if my users keep their files on a NAS with a deep folder structure my code is failing.
The code works in both cases with a local drive path.
Can anyone advise me what to do please.
Coldan
I have a table of previously used paths, some on a NAS.
When I test the selection of a new path gained with getdir()
I have tried both a SEEK on an indexed field (which was not possible because the path could be too long for an index ) and LOCATE
if the selected path is, say
\\NASSERVER209\MYUSERDATA\PROJECTS\__ABC PROJECTS - MINE\MY PROJECT 2010\WETTON_REAL 2010 V7_TESTER\
the code below fails when the path is already in the mypaths table.
Code:
Select mypaths
Locate For mypath = mynewpath
If !Found()
Append Blank
Replace mypath With mynewpath
Endif
So I have tried
Code:
Select mypaths
Scan
oldpath = ALLTRIM(mypath)
If !oldpath = mynewpath
Loop
Else
doit = .T.
Endif
Endscan
If doit = .T.
Append Blank
Replace mypath With mynewpath
Endif
Another routine in my application is doing the exact same thing with a LOCATE and this is failing as well.
So if my users keep their files on a NAS with a deep folder structure my code is failing.
The code works in both cases with a local drive path.
Can anyone advise me what to do please.
Coldan