What is the best way to monitor a network directory.
Thanks in advance
Otto
What is the best way to monitor a network directory.
Thanks in advance
Otto
Otto,
please explain the problem in details.
marco
Otto wrote:What is the best way to monitor a network directory.
Ciao Otto
Try to chek if the directoty exist .
IF ! lIsDir("\\server\share" )
lMkDir( \\server\share")
ENDIF
Regards MAurizio

Otto,
Why did you choose that design instead of just a DBF containing a record for each table? I'm not suggesting a redesign--just curious.
James
James Bott wrote:Otto,
Why did you choose that design instead of just a DBF containing a record for each table? I'm not suggesting a redesign--just curious.
James


Hi Otto
>From the ECR the directory() function or file() function needs 4 sec to notice that the ldb-file is deleted.
>The IPAQ notice this within milliseconds.
Curious! You are polling for the non-existence of a file from both the ECR and the IPAQs I assume. If the IPAQ consistently notices that the table is free within milliseconds then it must be polling that frequently. The only reasons I can think of for the ECR taking so much longer are one or more of the following:
I'm not sure why a 4 second delay is an issue here - I would have thought that would have been acceptable.
There are arguably better designs but if you investigate the above possible causes you may find a practical solution that is easier. Some things that might be worth trying:
Ideally the server would push the availability of tables to ECR and the IPAQs, but this is an unusual design in that you would have essentially one client (the server) talking to many servers (the IPAQs and the ECR).
Staying with a polling design I would suggest making the polling rate adjustable so that you can optimise the setting - you may have to reduce polling frequency to avoid server overload. Remember that directory / file searches are rather inefficient. You could use an xBase table, as others have suggested, or if you want real efficiency an array or hash on the server
Good luck!
Regards
Doug
Otto,
I, like Doug, am concerned about the polling rate and why you need to know faster than 4 seconds. Polling from each device faster than every second is going make a lot of network traffic. Have you run the task manager on the server to see how busy the CPU is? It is also causing a lot of disk reads.
James
HI Friend,,
You should work with mysql, there is a version that works with mysql FWPPC, would be much easier remote access from a mobile PC,
sorry my enghish is bad.
Regards
Willi
Hello Otto
I have a programm for restaurants that works like yours. I send the DBF files to pocket PC
and viceversa . All work fast and very well .
Example:
From the pocket PC
1 . Check if the wireless is ON
2 . Check if the server is ON and if the background programm on the server is ON .
3 . I send to the server a table situation request
4 . The server answers with a file ( 200b for 200 tables ) which tables are free
All this in less than 1 second.
Regards Maurizio
Hello Maurizio,
Thank you for your answer.
May I ask you how you do the following tasks:
From the pocket PC
1 . Check if the wireless is ON
I check the existence of a file on the server.
2 . Check if the server is ON and if the background programm on the server is ON .
I check the creation time of the file – the background program recreates this file periodically.
3 . I send to the server a table situation request
I use ASCII – lock files with the extention ldb and the table name to show a locked table
I check with directory() function.
4 . The server answers with a file ( 200b for 200 tables ) which tables are free
All tables from the table definition file which have no lock file are free.
What OS is on your server installed?
Best regards,
Otto
Hello Otto
1 . Check if the wireless is ON
FOR nX := 1 TO 10
inetinit()
aIpDNS:=InetGetHosts(Getenv("ComputerName"))
inetcleanup()
IF len(aIpDNS) >= 1
IF aIpDNS[1] == "127.0.0.1"
::lRete := FALSE
ELSE
::lRete := TRUE
exit
ENDIF
ELSE
::lRete := FALSE
ENDIF
sleep(200)
NEXT
2 . Check if the server is ON and if the background programm on the server is ON .
I create a file when the programm start
IF file(m->cServer + "in\ATTESA.OK")
::lRete := TRUE
ELSE
MsgInfo("No Serever")
ENDIF
3 . I send to the server a table situation request
I send a ASCII file with the number of the pocket PC and a tag Example: "01TABLE"
4 . The server answers with a file ( 200b for 200 tables ) which tables are free
I send a ASCII File with 0 or 1 Example "00001011 ecc..
What OS is on your server installed?
Windows XP
Ciao Maurizio