Click here to Skip to main content
15,895,142 members
Everything / Synchronize

Synchronize

synchronize

Great Reads

by honey the codewitch
Take control of which thread your code gets executed on, and how it does
by jerpat
How to get (almost) all your code in one place when using WCF together with Silverlight
by honey the codewitch
Using a popular RTOS to enable easy multithreading on your IoT gadgets
by Parallel Patterns
Introducing Memory Model in the context of .NET platform

Latest Articles

by honey the codewitch
Using a popular RTOS to enable easy multithreading on your IoT gadgets
by honey the codewitch
Take a page from .NET and enjoy an easy way to safely pass information between threads on an ESP32
by honey the codewitch
Take control of which thread your code gets executed on, and how it does
by Michael Chourdakis
A mutex with shared/exclusive access with upgrade/downgrade capability

All Articles

Sort by Updated

Synchronize 

27 Jan 2011 by #realJSOP
I wrote an article about how I handle the asynchronous nature of Silverlight:How I Optimized my Silverlight Asynchronous Web Service Consumption[^]
17 Aug 2011 by #realJSOP
You could simply not make a file available until it can be opened. Force the user to click a button to see a list of available files, and refresh that list when they do.
26 Dec 2014 by 28shivamsharma
Synchronized Blocks on object make that part thread-safe. Means Only one thread at a time can access that block. To access that block thread have to acquire lock then it can make operations & changes inside that block. In short it implements the mutual exclusion.
27 Jan 2011 by Abhinav S
SIlverlight does not support synchronous calls.Make use of the Action delegate to come back to your main code once the service returns.
18 Feb 2012 by Abhineet Ayan Verma
How to set event in case of calling CreateSemaphore ? I mean what I should use to avoid Main from exiting before my threads if I am implying CreateSemaphore in the Main itself??? I am using QueueUserWorkItem with Semaphore. Anybody please.
20 Feb 2012 by Abhineet Ayan Verma
Is there any way or API to get the count of Semaphore? The purpose is to SetEvent if the Semaphore Count is equal to the MaximumCount and no more threads are there to execute.
20 Feb 2012 by Abhineet Ayan Verma
I have done my part of Research and Search and found out that there is nothing to get the exact count of Semaphores. It is designed like this only and no API is released to know the exact number of threads waiting and executing and released cause of Race Condition.
17 Apr 2012 by Aescleal
How about sending the data as part of the message you post to the UI? Especially as it's only one word of information:LRESULT CContactFault::OnDeviceShortAddress(WPARAM, LPARAM lparam){ UINT data = reinterpret_cast(lparam); CsLoader = _T("%d"); CsTmp.Format(CsLoader,...
12 Apr 2018 by Ahmed AE
I have 3 dump files from 3 different machines pc1, pc2 and pc3. I am trying to sync the data from the 3 dump files with the database on my server but, unfortunately the dump files have similar unique ids for different records, because they are on different machines. When merging, the data from...
18 Feb 2012 by Albert Holguin
If you need to prevent main from exiting before your worker threads, then a semaphore really has nothing to do with that. You have to wait for your threads to finish. Do this by using the WaitForMultipleObjects() call with your thread...
1 Oct 2013 by alex giulio
hello every body!please help me! i want to sync data between gmail and software, but i don't have much knowledge about it. every can help me understand deeply about it, thank so much!
20 Sep 2013 by alimohammad2011
Greeting for the day !!Dear friends I am stuck on a solution i need to provide to my clients. Describing the requirement in detail so please don't mind the length of this post.I am supposed to develop an offline model for my asp.net (4.5) web application along with SQL server as db on...
3 Apr 2012 by AmitGajjar
Hi,i am bit confuse, if you would like to sync all the client database then why you want separate databases on server for each client ?Actually Sync framework will synchronize your specified databases at specified interval time. it can be set as downloadable/uploadable or both.If you...
24 Apr 2012 by amramaz
I have two threads : t1 and t2.t1 is the main thread, and it has created the t2 thread.After creating t2, t1 continue doing some work. on t2, there is at some point a code that I want to be executed on the t1 thread, while t2 continue to the rest of his code. is there a way that t2 can tell...
26 Mar 2013 by Andreas Gieriet
Change your code as follows:1) Give the Mutex the name @"Global\MyMutex".2) Call Dispose() on w after (or instead of) Close().Do the same for your other process.[EDIT]I would simplify the code as follows:public class Log{ public static Mutex m_Mutex = new Mutex( false,...
11 Oct 2011 by André Kraak
For trigger removal see DROP TRIGGER[^].
18 Sep 2013 by Anoop Brijmohun
Hi all,I am currently developing a solution for a chain store.the backend data storage is SQL Server 2012(main server) & SQL 2012 express(store).which is the best method to transfer data between the servers?taking into consideration the connection can drop in the middle of the bulk...
3 Apr 2013 by Ariana Bond
Hi,I am trying to develop an application to synchronize two directories of the two live domains hosted over different servers but i am not getting the logic to implement.I have tried it to do with tcp client server on localhost using different applications on different ports, but its not...
21 Feb 2013 by Ariana Bond
Hi ,I want to synchronize two textboxes which are in different user controls of silverlight , i want that , the moment i start writing something in one textbox it should also appear in second textbox.Problem with binding controls,public static readonly DependencyProperty...
16 Feb 2012 by ashok_rgm
Hi All,As per my requirement in my complete system it consists of both desktop and web application. Desktop application(OCASIONALLY CONNECTED APPLICATION) will be accessing the data from local database and will be in sync with central database hosted on server. Desktop...
30 May 2013 by ayesha hassan
I have developed a single server/multiple client TCP Application.The client consists of x number of threads each thread doing processing on its own data and then sending the data over TCP socket to the Server for displaying.The Server is basically a GUI having a window. Server receves...
6 May 2019 by badarhn
hi all I'm testing the new Microsoft cognitive service example, the code below : GitHub - microsoft/Cognitive-Samples-VideoFrameAnalysis: A library with sample apps for continuous analysis of live video, using the Microsoft Cognitive Services Vision APIs.[^] when I try it returns an exception...
11 Feb 2013 by balu12345
Hi All experts, I am a bit new to WCF. I had explicit requirement to prepare a wcf application with below requiements,1. Need to prepare synchronous WCF service hosted in IIS2. Client will consume synchronous WCF service.3. request & response might take long time, as other...
1 Oct 2013 by bbirajdar
You should better start researching on your own and then come back with specific questions, code snippets and error messages if any.Start from this link Read Gmail in C#[^]
10 Nov 2011 by bhagyap
I am working with winforms,where i have to include synchronization which will have following features:-1.Downloads information about the available divisions, purposes and languages2. Requests a list of files matching the selected options3. Checks the downloaded list of files against...
10 Nov 2011 by bhagyap
Hi.. i am working with one of the desktop application and synchronization is part of it(i want synchronize done within intranet using web services)..I tried doing it with Microsoft Sync Framework but wasn't possible,so can anyone let me know how can i achieve this??Thank You in advance...
20 Feb 2012 by bjorn_ht
If you just want to check if a semaphore wait would block, then just call the wait function with timeout 0://! waitForSemaphore sets this event before a potential blocking attempt//! to aquire the semaphore.extern HANDLE warnEventHandle;//! The semaphore.extern HANDLE...
10 Dec 2013 by Bojjaiah
Hi all,I am trying to synchronize the two databases programmatically. So I have downloaded from msdn[^] and install my system to add the references of below dlls.Microsoft.Synchronization.dll Microsoft.Synchronization.Data.dll Microsoft.Synchronization.Data.SqlServer.dllWhen I...
12 Dec 2013 by Bojjaiah
hi all,finally I degrade the framework v4.0 to v2.0, now working fine.thank you for all.
22 Apr 2014 by Chetan Saini
I am using local database cache using Visual studio 2010 dialogue Box by referring this tutorial. When i run code for synchronization by following all the steps as specified in tutorial everything works, I also get updated result but my local database(Compact) is still not updated. Is it...
22 Dec 2010 by chris4562
Hi all, I have a multithreading issue I cannot find a good answer for,I have a majority of my code in a dll that I have made to support my program, it creates threads in its internal objects. The client application creates a few as well. Are these threads all created in the same process...
22 Feb 2013 by Christian Amado
The same question was answer here: StackOverflow Forum[^].Regards.
5 Jun 2011 by Christian Graus
It's going to be impossible, by the time you tell the other computer where your video is, it will have moved on, itself. Your best bet IMO is to synch the start of the video, then play the videos in programs which both regularly make sure that the position of the video is in line with how much...
4 Aug 2012 by Christian Graus
If you want it to appear as a normal folder, then yes, it's a shell extension.
9 Nov 2013 by Christian Graus
The GUID should be the primary key. That would be the point of using them, your clients can create new rows that remain unique when synched to the server.
17 Apr 2012 by Chuck O'Toole
I'm confused by your original problem. You say your results are "inconsistent" but are unclear as to either what that means or how you've decided they are "inconsistent".As for locking, since you are dealing with a single value, UINT, and not a structure with multiple variables, there's no...
5 Sep 2011 by Claudio Bertsch
I have a Windows Forms application.The database is a MSSQL Express.The offline cache should be no SQL Compact.My question:Is it possible to use locally and on a SQL Server Express, to syncronize this automatically.My application requires DocumentID's and CustomerID's. These must be...
6 Sep 2011 by Claudio Bertsch
Hello,Thank you for your quick response.I've done it now I can sync to a SyncOrchestrator the main database and the locale.However, there are still some open questions.How do I initiate a sync from only one record? I create a new article and want to save it now. If I start a...
15 Feb 2017 by CodeGlitch
Hello All!I need to create a client that will sync some of the users local folders to a remote server but i can't use dropbox or any other client already created, i need to make my own to implement features according to my company needs.What are your opinions about what should i use? I have...
25 Sep 2013 by CodeGlitch
I understand what you're saying and i see the same answer about other tools already doing the job over and over again, but this is for a specific organization spread with specific needs that those tools wont cover, the use will be the same, syncing files but there are some core changes that are...
4 Apr 2013 by CodeHawkz
Hi there,You need to look into 'FTP'.The conventional web we browse is based on 'HTTP' is designed for viewing text, images, etc. but not for file transfer. 'FTP' is designed this in mind and if you can access your server using FTP you should be able to do most of the operations that you...
4 Aug 2012 by Cool Smith
i need to map remote repository as a local folder for example remote ftp folder to local folder in my system just like google drive, so that when i delete a file locally, it gets deleted remotely and when i add files locally to the folder, it gets uploaded to the remote repository. i...
14 May 2014 by Dharmesh Parekh
I have implemented synchronize between SQL server 2008 and SQL Compact database with two way.It is perfectly working with insert and update data in database and synced very well.But if I try to delete a record from one database like sql server after that i synced with sql compact it is...
17 Apr 2012 by dsandru1
I am trying to figure out how to access variables in my workerthread while it is doing work. What I have so far:Workerthread has updated the data.Postmessage to the UI.UI calls GetData from worker thread.//Message Routine from Post Message in UILRESULT...
22 Dec 2010 by Dylan Morley
Pretty sure the DLL is loaded into the application process and all threads are created within that Download Process Explorer http://technet.microsoft.com/en-us/sysinternals/bb896653[^] and you can browse the threads your process has created (invaluable tool if you don't have it...
22 Dec 2010 by E.F. Nijboer
A dll used is normally "in-process" and therefore you could use critical sections. This would not apply if it would be a COM server dll that you use. In that case it would be "out-of-process" and you should use a mutex instead.Good luck!
20 Feb 2012 by E.F. Nijboer
Check out NtQuerySemaphore. Some extra info can be found here: http://stackoverflow.com/questions/2579536/semaphores-values[^]Good luck!
26 Feb 2013 by Edison Heng
Synchronizing between Android and desktop
3 Oct 2013 by Eduard Keilholz
There are a lot of tools available that can do that for you, I think there's no need to develop this yourself. If you still want to make this yourself I'd use a File System Watcher to track changes in a certain directory and keep a list of changes in memory. The periodically send the changes...
27 Jan 2011 by Espen Harlinn
One option, that might be possible, is to use:IAsyncResult.AsyncWaitHandle[^] - the asynch web/wcf request methods returns an IAsyncResult.It's possible that this can be used to create a synchronized wrapper for the service reference. I haven't tried doing things this way in SilverLight,...
18 Feb 2013 by essence
A walkthrough explanation of the issues and solutions to thread safe synchronization.
13 Feb 2013 by essence
Make your synchronizion easier by using Read/Write extensions.
15 Feb 2013 by essence
ConcurrentDictionary's methods can call your value factory more than once.When is this a problem? How can it be overcome?
28 Aug 2012 by fjdiewornncalwe
One of two things has gone wrong.1) Your service reference is still pointing at a non-existent version of the service on your local machine. - In this case check the properties in your service reference or connection depending on how you are calling the service and make sure that the path...
8 Feb 2012 by Foulques NERA
I'm writing a simple service for synchronizing date&time between PC's.How to change PC date-time (local or global) with visual dotnet c++ API ?I think I need to require privilege to do it too.Best regards.
2 Aug 2012 by FriendOfAsherah
Using the new MS Sync Framework I could successfully setup sync with a filter clause for one table:e.g.: serverProvision.Tables["TICKETS"].AddFilterColumn("TICKETID");serverProvision.Tables["TICKETS"].FilterClause = "[side].[TICKETID] = @ticketid";But I want to combine the...
19 Jul 2013 by Ganesh Satpute
Hello, I am total newbie to android application development.I want to develop an Android application which will sync the particular folder on Android device and PC over WiFi. This app should automatically search for WiFi router. Where should I start? I found some articles which...
29 Jan 2014 by GAURAV KUMAR PATHAK
I have to run a website on local IIS as well as on Server. User can work on local IIS offline. and he can also save that work on online Server with button click. when he will connect to internet. Please suggest me how could I do this?
29 Sep 2013 by GauravThorat
Hi Friends,I wanted to Synchronize sage 50 with C#.NET based Windows Application which should having facility to updated Stocks, and other Information, all information should be transferred using Excel files.So what should i consider while working/starting with this.Thanks All..
24 Dec 2012 by golrokh_ka
hi,my application has two parts, a version uses in central company and a version uses in another companyevery day all subcompanies should send their data for main company,and they can have reports all of them,also i have basic data tables i need the best way for replication , i have some...
25 Feb 2021 by honey the codewitch
Take a page from .NET and enjoy an easy way to safely pass information between threads on an ESP32
27 Feb 2021 by honey the codewitch
Using a popular RTOS to enable easy multithreading on your IoT gadgets
28 Jul 2020 by honey the codewitch
Take control of which thread your code gets executed on, and how it does
14 Oct 2012 by I.explore.code
I would recommend writing a Windows service that will run at scheduled intervals as decided by you and download the latest XML files from the external website to your server and save the data in those XML files to your database.This will help you save precious user time because you can...
22 Dec 2011 by idle63
To be on the safe side and not depending on tools (which can change) I personally would choose the hard way. Means: make a shadow of transactions which will be transferred (with my self made transaction control) as soon one is online again.Why: In case of mistakes, I prefer to be responsible...
26 Mar 2012 by IviKAZAZI
Hello everybody,I am developing a desktop application to synchronize sql server 2008 database with the database of a connected windows mobile device.(.sdf sqlce database).I am a newbie in c# and i dont know how to do it,any help,or sample code will be appreciated!Thanx in advance !!
12 Jul 2012 by IviKAZAZI
Hello all,Im developing a mobile device app,and im using syncframework to sync .sdf database on device with sql server 2008 in server. Im using WCF service library as a middle tier. I have a large number of rows and tables to sync,and i get an out of memory exception. I updatet the code...
6 May 2013 by jaiswal.richa
Hello Everyone,can anyone tell me that In Sync Framework, when i make changes on the form , Why does the local database not get update. the changes got saved on the server when i am connected to the server. but when i got disconnected with the SQL Server, and make any change there, i expect...
28 Jan 2014 by Jay Jayswal
I am currently working on one project in which there is database Synchronization between desktop app(C#) and web-app(php). My server side database is MySQL and local desktop app stores data in Local database.Here case is desktop application may not connected with internet all the time and...
5 Jan 2011 by jerpat
How to get (almost) all your code in one place when using WCF together with Silverlight
31 May 2013 by Jiří Miklík
Using one socket for many threads isn't best idea.My suggestion:Each client thread opens own connection, server thread is listening.With this solution you can find the end of client thread with error (socket dies).And you cannot distribute opened socket to client threads at start time.JiMi
17 Feb 2013 by Joan M
Hello all,My father in law has just bought a Samsung Galaxy S3 phone.He had an S2 before and was completely happy with it.Witht his old phone he was able to synchronize notes with outlook (without exchange) and now with the new phone it seems it is not possible.Do you know if it...
8 Feb 2012 by Jochen Arndt
See SetDateTime method of the Win32_OperatingSystem Class [^] [UPDATE] and ::SetSystemTime().
17 Apr 2012 by Jochen Arndt
In your case you are only passing an UINT value. So just pass it using the WPARAM or LPARAM parameter.When implementing a GetData() function, you should use locking inside that function and at all places where the data is written by the thread. An example:class CMyThreadClass{ ...
10 Nov 2011 by johannesnestler
I think you can not expect someone to write your software. Ask more specific questions. Where are your problems, what kind of software is this? You need help on architecture or code?A good common advice is: approach your project step by step. First think about the platform/architecture of...
7 Apr 2013 by Johirul Islam Tarun
You can Group the sum of In,out by Date wise and item Wiseplz see this :Select ItemCode,ItemName,TransactionDate, Sum(In) as INQty, Sum(Out) as OutQty, Sum(In)-Sum(Out) as Balance from StockTable Group by ItemCode,ItemName,TransactionDate
8 Nov 2010 by John Kenedy S.Kom
This articles uses light threading, mutex, and simple algorithm to determine file to synchronize
6 Nov 2012 by joshrduncan2012
Hi everyone! It is possible to have a Windows Forms application check for updates to the files if the updates are stored on a server and if so, automatically synchronize with the updates by downloading the newest versions? If so, is this a recommended method to deploy updates or should it be...
2 Sep 2014 by kbrandwijk
You have a string[][]:string[][] myArray = new string[][] {};You can either use one method for all tables, or define a separate method for each table.Using one method for all tables, you define a list of tablesList tables = new List { "table1", "table2", "table3",...
2 Sep 2014 by KergalBerlin
Hi community,I am new to parallel coding and have some trouble understanding what I have read about it. Let's assume the following scenario: I have 5 tables in a sql server and I receive data from source X which needs to be filtered,sorted and validate and the resulting string[][]...
25 Jan 2011 by khuong_vnt
Hi everyone,Example, I have a Silverlight Application here:Public data as String = "abc"Private Sub From_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded Me.InitControl() Me.Label1.Text = dataEnd SubPrivate Sub InitControl() ...
14 Oct 2012 by Kirolos Costa
I need to synchronize online XML file which given to me from another website with my access databasewhat I exactly need is to make this sync offline which means that when my website user open the page he will find the last data from xml fileI tried to fix it by deleting all the table data...
23 Apr 2012 by kkhippytch
Hi!Has anybody met the following problem - there is a thread A that should notify another thread B and then wait for a backward notification from the thread B. Something like that:AutoResetEvent BNotifier = ...;AutoResetEvent ANotifier = ...;Thread A:1)...
24 May 2016 by koolprasad2003
you can use following code to take a backupprivate void Backup(){ string constring = "server=localhost;user=root;pwd=qwerty;database=test;"; string file = "C:\\backup.sql"; using (MySqlConnection conn = new MySqlConnection(constring)) { using (MySqlCommand cmd =...
16 Feb 2012 by krumia
I don't think you can bear the burden of comparing whole databases.What you can do is..1. implement a publisher-subscriber architecture.2. main server adds messages to a message queue when a database change happens.3. desktop applications subscribe to the main server and get messages...
7 Feb 2013 by kunal jangade
The issue is I have my database at my machine, the application is developed and given to the users. The user uses the application daily updating, inserting and deleting data, what I want is that I get all the data in my database, the users are located at remote place. As the size of database...
8 Apr 2013 by kunal jangade
I want to retrieve data from 4 Tables to show balance of items for every date. My tables structure are as:TABLE: Resource_MasterResourceCode primary key, ResourceName, UnitCode, TenderCode, ResourceRate, Status, Dt, Resource_H_CodeTABLE: UnitMasterUnitCode primary...
27 May 2012 by lilyNaz
Hello,I have written a driver and I need my driver to call a function in a user mode program(which can be done using DEVICEIOCONTROL), then my driver have to wait for the user program to respond. I need a sample code which does so.Thanks
12 Dec 2010 by linkman_xbp
Hello there,I read a lot of information of this, but nothing works to me.I tried JCraft (Webdav + FTPS), it works perfectly, but it's impossible to exclude definitively file or folder of sync.So I tried "SmartSync" (part of Aptana plugin), it is possible to ignore files of...
27 Jan 2011 by lmoelleb
Silverlight only supports async calls. You have to deal with it.A userinterface is typically databound (on top of a ViewModel), so when you set the data in the Model, the ViewModel will detect the changes, and raise it's own property changed notification that will update the view.You...
4 Jun 2011 by lovsea
I want to implement a player for synchronizing two videos on different pc.Unluckily,I met some problems to prevent me to do it. As follows:(1).The player dropped samples when it played a avi file with vmr9. I tested different video renders ,such as haali,vmr7,vmr9... And the results is...
26 Mar 2015 by Mahmoud Abdou
Hi Guys,I have a document synchronization component which I built using Microsoft Sync Framework. Background:On the client I use Microsoft File Sync Provider On the other side (server) I use custom sync provider Sync is running on the client and it is talking to the server through...
13 Sep 2013 by Makzrider
I'm Trying to Sync my gmail account in my asp.net project with back end of c#. Right now I can just send mail using the code:public void SendMail() { //Build The MSG System.Net.Mail.MailMessage msg = new System.Net.Mail.MailMessage(); ...
13 Aug 2013 by mamali-1346
hi all.i have a winform and console in c# 2013.i want to pipe them and send&receive data.data means character string.something like chat but so basic and user can't control this process.this process must be synchronized.they should be able to send and receive data at the same...
9 Oct 2011 by Medo-I
Hello allI have created a application in my WindowsCE device by C#, and this application saves data in the WindowsCE device.Now i want do synchronization between WindowsCE device and PC, when i connect the device to the PC by USB cable this application should transfer the data from...
17 Feb 2014 by mehdijafary
Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file, a memory buffer, or transmitted across a network connection to be used later in the same or another computer environment. And this sequence of bits can be of any...
31 Mar 2014 by Member 10616560
DbServerSyncProvider serverSyncProvider = new DbServerSyncProvider(); SyncAgent syncAgent = new SyncAgent(); syncAgent.RemoteProvider = serverSyncProvider; SqlConnectionStringBuilder builder = new...
1 Apr 2014 by Member 10616560
I am working on project where i need to use database synchronization for offline apps. Up to some extent i am successful, i am done with synchronization for client to server using code below - DbServerSyncProvider serverSyncProvider = new DbServerSyncProvider(); SyncAgent...
24 Dec 2014 by Member 11333197
Suppose we have the following classclass Class1 { public void Method1() { synchronized(myobject) { /* some code */ } }}where myobject is the instance of the classclass myClass { public void Method2() { ...
24 May 2016 by Member 11460370
i am creating a windows desktop application on visual studio 2012 with front end c#.net and back end MySql database.My Master database is offline and i want to take backup on live server.how it is possible?what are the ways to take backup on live server for windows desktop...