Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have created a windows application which have server and client version.
SQL database installs on the Server version and client access it.

At the time of opening the application from client it creates a dataset aqnd access it; at the same time if that application is also opened from any other client pc it also create another dataset for that particulat pc. Any changes are not visible on the client pc runtime.

How do i refresh this disconnected databse?

Thanks in advance.
Posted

You have used dataset and it's worikng in Disconnected mode.
As word suggest its a "Disconnected Architecture." databse connection get closed after data fetched. so you can't get updated data each time.
so if you want updated data then you need to hit database again.
or use classes that support "connected architectures", like Datareader.
 
Share this answer
 
v2
Dear Sir,

I have already face this same problem.
i created xml file and transfer the values between 2 datatable (client - server)
C#
DataTable dt1 = new DataTable("Table1"); 
DataTable dt2 = new DataTable("Table2");
dt1.Merge(dt2);
dt1.WriteXml(@"C:\test.xml");


Regards
JP.SIVARAJ
 
Share this answer
 
v2
Comments
sahabiswarup 2-Jan-12 7:48am    
thanks for your valuable comments i'll try your way.
you can make a Sub to clear DataSet and Fill it again , write this sub in a button event or a timer
 
Share this answer
 
Comments
sahabiswarup 2-Jan-12 7:48am    
thanks for your valuable comments i'll try your way.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900