Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem In implementing a Function SelDirDlg
Message
From
20/12/2012 02:27:32
 
 
To
19/12/2012 13:56:51
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01559888
Message ID:
01560249
Views:
169
Ok, But do you exactly mean by RELATIVE PATH. You mean to say if the a user on machine-1 (server) fetch records from the same machine fullpath will is E:\ABCD\123.pdf and I should store relative path as ABCD\123.pdf.

If it is so than consider a case in which suppose a person sitting on server machine (Machine-1) fetch information from Machine-2. In this case Path becomes \\MACH-2\XYZ\123.PDF in this what will be the relative path ?

So for this the interface module installed at Network Machine is considered it will have to first check that whether DATA fetched is from local machine (if It starts with something line E:\ or F:\ or starts with "\\ " . If it starts with E:\ or F:\ like, the E:\& F:\ needs to be replaced by Server Name. ?

Is this logic should I apply or any other better Idea.


Regards
Code Box





>Solution 1: Don't store the complete path, only the relative path. The root directory must be controllable by the user, in another word it should be possible to change it in a configuration screen.
>
>Solution 2: NEVER zap, unless it's for maintenance, like once or twice per year! Use cursors instead, or check Set Deleted in Help.
>
>If you MUST zap, reread Solution 2 until you change your mind.
>
>>Thanks Its working. One more Favour,
>>
>>I have created a application that works fine for single user. The application has a Bill.dbf which contains the name of file and its location on Hard disk.
>>
>>When the user search for the file its Name & location is instantly displayed on screen .Further When the user click on the location link the file it is opened there and then only . I have used Shell command to open the File for this. For a single user it is working fine.
>>
>>Now I have been asked to make it multi user so that any one on the network could search from anywhere and could open the file.
>>
>>For the above purpose I have made a small interface that will have two menus namely Search & Exit. The above interface will be installed at the various network PC
>>
>>
>>
>>Problem No-1
>>
>>When I search for Bills from Network PC, The data as contained in Bills.dbf i.e Filename & its location is displayed on Network Screen. However, When I click the same the it didn’t gets opened obviously because the Path saved was E:\Bills\12345.pbf i.e the local path of Server Machine where Bills and the main application is installed.
>>
>>
>>In other words what I will have to change my location to make it universal for all machines including Server & Network Machine, means something like \\ABC\BILLS\E\12345.PDF instead of E:\BILLS\12345.PDF so that when I click on the link in interface, or server the file should get opened.
>>
>>Problems No 2:-
>>
>>Up till now since I was using single user, I was able to PACK and ZAP Records in between the execution of Procedures/program. But Since now I will be under multi network, what is the best way to execute PACK, ZAP etc.
>>
>>
>>Kindly Give other guidance by your own to have good network application
>>
>>
>>
>>
>>
>>
>>
>>GETDIR() shows network comps, just try it with GETDIR("","","",64)
>>>
>>>
>>>
>>>>I am trying to make a tool that list path of all the the PS files in a .dbf file.
>>>>
>>>>Using GETDIR() Command I am able to fetch Data from the local drive, but since GETDIR() does not show network drive, I am using an other function desigend by You "FUNCTION SelDirDlg" as defined in my Functions.prg
>>>>
>>>>My problem is that when I use GETDIR() Function it works fine and I am able to fetch my desired records but When I Use "FUNCTION SelDirDlg" in place of GETDIR() to fetch from some folder from a network drive it starts giving numerious errors like:
>>>>
>>>>1) NO Parameters Defined
>>>>2) INvalid Path
>>>>3) Nesting Error etc etc
>>>>
>>>>I tried hard to overcome but could not do so.
>>>>
>>>>Can you help me by making necessary changes in my program file GETALLFILES.PRG or any other file as you deem fit so that I could add data from Network Drive also and please also tell me what changes have been made and why & where I was going wrong.
>>>>
>>>>My objective is to Fetch Data from Network Drive similarly as I could fetch from local drive using GETDIR().
>>>>
>>>>FUNCTION SelDirDlg is defined under Functions.prg, however when I use it in place of GETDIR(), it generates error
>>>>
>>>>My small Application code can be downloaded from
>>>>
>>>>https://www.dropbox.com/s/3xutsnlbe2b7dbp/CBMS.zip
>>>>
>>>>Thanks in anticipation
>>>>
>>>>Regards
Harsh
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform