Technical question

  • Thread starter Thread starter r
  • Start date Start date
R

r

Hello all.
I have a application that uses a sqlserver database in network..
but sometimes network get disconnected and I don't have access to that
databases..
then I want to use that database in local and then after connecting to
network merge those changes that were made in local
how can I implement this?.Is there a simpler way to meet this problem??
thanks in advance
 
Hello all.
I have a application that uses a sqlserver database in network..
but sometimes network get disconnected and I don't have access to
that databases..
then I want to use that database in local and then after connecting
to network merge those changes that were made in local
how can I implement this?.Is there a simpler way to meet this
problem?? thanks in advance

I don't know if there is some sort of already-built solution to that,
but you certainly can *do* it. Whether or not it'll be easy is another
question altogether.

If you're not looking to read data, just queue it for writing, you
could implement something in your program where you add pending
database changes to a queue, and then when the connection to the
database server becomes available again, run through the queue to empty
it. If you use the queue for the entire application's database writes,
you can have it such that it'll dispatch immediately when the database
connection is available and when the database server goes away you can
let the queue grow until the connection comes back, and then flush the
queue.

That's the jist of the implementation, anyway. The details and an
implementation would be up to you, of course. Here is some information
on using queues, generally:

http://arcanecode.wordpress.com/2007/02/20/collections-in-c-the-queue/

--- Mike
 
r said:
Hello all.
I have a application that uses a sqlserver database in network..
but sometimes network get disconnected and I don't have access to that
databases..
then I want to use that database in local and then after connecting to
network merge those changes that were made in local
how can I implement this?.Is there a simpler way to meet this problem??
thanks in advance

Hi r,

This is more of an SQL question than C# and you will most likely get better
answers in an SQL group. I believe what you need is SQL Server Replication.
There are different types of replication and I suggest you ask in an SQL
group which kind is best suited for your needs (or read up and decide for
yourself).

These articles may give you an overview and a few tips.

[Setting Up Merge Replication: A Step-by-step Guide]
http://www.databasejournal.com/features/mssql/article.php/1438231

[SQL Server Replication]
http://msdn.microsoft.com/en-us/library/ms151198.aspx
 
Back
Top