in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Date of Server.

Last post 04-14-2008 12:01 PM by C1_AndreyD. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 04-14-2008 2:24 AM

    Date of Server.

    How can i pick date of server where Datalibrary hosts ?  

    I want some code to be executed on server (where data library is hosted) instead of Client  so can you guide me how can i do that.

      

     

     

     

     

    Adnan Memon
    Filed under:
  • 04-14-2008 7:49 AM In reply to

    Re: Date of Server.

    Hi,
     
    You can put some custom code to the Fill or Update overridden methods within
    the RemoteService class. These methods are executed on server side.
     
    Regards,
     
    -Andrey
  • 04-14-2008 10:19 AM In reply to

    Re: Date of Server.

    Will this code work ?

    In Client Project i m writing following code

    Public Function GetDate() As Date

    Dim Remtserv As datalibrary.RemoteService = CType(Me.C1DataSet1.RemoteDataService, datalibrary.RemoteService)

    Return Remtserv.GetServerDate

    End Function

    and in RemoteServerice Class i just write a code

    Public Function GetServerDate() As Date

    Return Now

    End Function

     

    Adnan Memon
  • 04-14-2008 12:01 PM In reply to

    Re: Date of Server.

    Yes, I suppose it will work. Have you tried this code?
     
    Regards,
     
    -Andrey
Page 1 of 1 (4 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.