locked
Passing Dataset with datetime columns to a c# webservice emthod RRS feed

  • Question

  • User1175274894 posted

    I have a C# webservice(server) and C# windows form(client). My webservice method accepts a dataset object as parameter. The dataset has 2-3 datatables, and in the tables there are datetime columns.

    The client is installed in different locations, when the dataset is sent from a client the datetime columns are modified by adding/subtracting the datetime offset values, because of this the webserver is receiving the wrong dates.

    I am not in a position to change anything on the client, how can I handle the issue on the server side (in web service).

    All I want is that the date fields should be transferred exactly as entered at client(like string data type).

    I am using access database as backend for windows forms client. When exporting the data from client, the client creates a dataset(2-3 tables) and passes the dataset to webservice method. I debugged the client and I think it is during the serialization, the datetime offset is added to datetime columns. I want to remove offset during de-serialization.

    example: if at client the date is  01/01/2011, the server is receiveing it as 31/12/2010.

    Friday, March 8, 2013 3:12 AM

All replies