I have two computers on a network, each with a seperate EXE of a my VFP program. Machine 1 has the data and I use SET PATH TO on machine 2 to find the data on machine 1. My question is:
How can I get the date that is on machine 1 from machine 2?
If U want to have the same date on the second computer U can set the proper date on the "Server" and record it into a table and set it on the second one "Station".
Hope this helps.
I'm working on machine 2 and I would like to get the date thats on machine 1 using VFP code. Is this question any better?
P.S
I was thinking about to ways of going it can anyone tell me if these ways can work
1.) Create a field in a table in the database thats on machine 1 with the default value set to DATE(). Then from machine 2 append a new record in the table and copy the field's value.
2.) Create a stored procedure in the database that returns the system date.
Hi Chrisman,
What you are thinking will not work. When you wrire DATE() in machine 1 from machine 2, the DATE() value is the same as machine2's date.
If you are thinking, you are going to ask some one to create a field from Unit1 or press some button in Unit1 to do this, and then read it from unit 2... it sounds bad... you can very well get the date by word and set it here.. No one intends to set the date differently between units.
However, there is possiblility to get this information.
1. Try some sort of API call.. I am not sure of this and dont want to suggest when I am not sure.
2. Try a low level file creation to be done by the unit2 in unit1 by unit1. Then read its creation date value.. then delete it.
I did not reply earlier, since I havent tried.. (The server/user units are not accesible for the moment.. my network card is out for upgrade). I can test and then post a reply as soon as I have completed my hardware setup.
I am not sure what happens when unit2 creates a file in Unit1.. is it getting the time stamp of unit1 or unit2.. I want to check this. If the time stamp is that of unit1, then we can do a ADIR of this file and capture that date.
You can note these ideas and tru yourself also. ramani :-9
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.