Guest scorpion53061 Posted June 19, 2002 Posted June 19, 2002 Is there a way I can code to make the time and date be read from a server on a network instead of the machine it is running on. Quote
Anis Posted June 19, 2002 Posted June 19, 2002 I don't think its possible, unless you have a Server Program running on server. And then as soon as client login, it request server for data & time, and server send it to client.. Quote Regards, Anis Miles to go Before I Sleep.
Guest TheIrishCoder Posted June 19, 2002 Posted June 19, 2002 Could be a good model for a simple web service on the server that your app could call/consume for it's date and time. Quote
Guest scorpion53061 Posted June 19, 2002 Posted June 19, 2002 Thank you!! Could you give me a sample of what I might use to call/consume (code wise in the app) to get that date and time. I do have a web service on our server. Quote
Guest TheIrishCoder Posted June 19, 2002 Posted June 19, 2002 I meant a .net xml WebService using asp.net. So assuming you are saying this is what you have it can then be consumed from your client program with little difficulty. You could have a method on your WebService like so:- <WebMethod()> Public Function ProvideDate() As Date Return Now End Function With your WebService compiled and installed on your server you can proceed to create your client program. In the client program you can reference the web service as a web reference. Once it's referenced your code to get the date would be:- Dim WS As New [serverName].[WebServiceName() Dim ServerDate as Date = WS.ProvideDate All this assumes the server is a windows server with .net installed. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.