Click here to Skip to main content
15,891,204 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 Title

Synchronize 

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(); ...
14 Sep 2013 by Richard MacCutchan
You seem to have two different issues here. In the first you are sending mail from ASP.NET, which you seem to have working. In the second you are trying to create a mail client application. Your mail client will need to implement SMTP as described in RFC 5321[^], for sending mail.[edit]For...
30 Sep 2018 by Steven Coco
This illustrates a simple pattern that provides a lock that can always be invoked; and may be a no-op for a non-synchronized implementation.
16 Aug 2012 by scott_liu
It employs a dynamic trigger, a CLR Stored Procedure, and a Web Service to sync data from a MS SQL Server to MySQL.
23 Jun 2015 by Member 11787080
I am working on Andriod app, which must work in offline, when device is connected to the wifi, it has to exchange the data(sync) between server and app.. i find sync framework. but i need a suggestion from someone.. please help me.Andriod Sync Adapter or Other libraries is better?
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 Jun 2015 by TarikHuber
We have a relative big SQl Server 2008 Database that is runing in our Companys LAN. The management want's that ONLY SOME of the order data could be called from the internet, so the clienst could track the status,change order parameetrs etc.. Because I have no expiriance in online...
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.
8 Feb 2012 by Jochen Arndt
See SetDateTime method of the Win32_OperatingSystem Class [^] [UPDATE] and ::SetSystemTime().
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.
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...
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 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!
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 2011 by sunder.tinwar
Hi all,My friends are working on a project where they have a website attached to main database on server and they have individual client application attached with local database for transaction. Say they are working on hotel domain where they want their client application to have...
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...
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...
15 Sep 2014 by Zon-cpp
Hi,i develop a class to write logs. it writes with "StreamWriter.WriteLine()" function.logStream.WriteLine(msgWrite);logStream.Flush();some different threads use this class to write logs, in one text file(The log file is common for all threads) do it need to lock()...
15 Sep 2014 by Suvabrata Roy
Yes it needs lock,How a data write to a stream :Stream is a pointer which holds some memory now when we write data to file stream data would first store into buffer and then flush to your memory now in between that if two or more threads are working simultaneously then buffer may be...
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...
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...
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...
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...
25 Sep 2013 by pasztorpisti
I always used rsync over ssh for this purpose. It's a linux toolset but you can install for example cygwin on windows and then you have the very same tools.An advantage of this is that you can easily connect unix/mac/windows machines with this tool. ssh is widely used and trusted secure...
15 Feb 2017 by Srusti Thakkar
I am also want to do this. But I want to sync local folder with onedrive using C# technology. Is there any solution?
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...
27 Feb 2021 by honey the codewitch
Using a popular RTOS to enable easy multithreading on your IoT gadgets
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...
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,...
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{ ...
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...
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[][]...
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",...
25 Jun 2013 by Member 9996541
Hi I want to synchronize our Java desktop application to Iphone Photos and files or access files and photos of iphone.Is there Any way to do this? I have searched a lot but could find solution Please give some idea or Suggestion to this.Thanks
22 Oct 2013 by Paulo Augusto Kunzel
Hello,You may not have searched that well..... kkkkkkk....Have a look at the following links:http://www.codenameone.com/[^]http://www.robovm.org/[^]http://oss.readytalk.com/avian/[^]http://www.xmlvm.org/overview/[^]https://code.google.com/p/j2objc/[^]
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...
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 Jan 2014 by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
I do a research and following is what I have found.Microsoft Sync FrameworkBuilding online/offline synchronization capabilities with the Microsoft Sync Framework[^]HTML 5Offline Web applications[^]Build an HTML5 Offline Application with Application Cache, Web Storage and ASP.NET...
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 E.F. Nijboer
Check out NtQuerySemaphore. Some extra info can be found here: http://stackoverflow.com/questions/2579536/semaphores-values[^]Good luck!
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.
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...
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
27 May 2012 by Mohibur Rashid
Well, I don't know much about this, but one simple solution is in mind.from application you can pass the pointer of your function to dll. after that your driver call call the specific function
27 May 2012 by User 59241
You should perhaps read the series of which this article is part:Driver Development Part 2: Introduction to Implementing IOCTLs[^]
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 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...
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 =...
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...
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...
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...
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 Jul 2012 by vandananarula
I need to sync the SQL Server Database with that of Compact Server DB.Please help me as i don't know how to proceed.I am using Smart Device Application in VS 2008 for windows mobile app development
9 Jul 2012 by vandananarula
I was able to solve the problem of synchronizing DBs from Windows mobile to SQL server and vise-versa.Following are the links which i followed...
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() ...
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...
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.
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[^]
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,...
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)...
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...
31 Mar 2014 by Member 10616560
DbServerSyncProvider serverSyncProvider = new DbServerSyncProvider(); SyncAgent syncAgent = new SyncAgent(); syncAgent.RemoteProvider = serverSyncProvider; SqlConnectionStringBuilder builder = new...
21 Feb 2013 by raythatha7
actually i want to sync file using WiFi in C#. i search a lot in Google but i can't get anything so, please help me. Where i am start this application actually file sync is done using "Microsoft File Sync Tool" But main thing is that how to transfer the file via WiFi.And i don't want to use...
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..
30 Sep 2013 by MK-Gii
Use ODBC or OleDB connection - this works great for Excel files (can read it as a database and update it just like an ordinary databse - using SQL syntax)
30 Sep 2013 by Pheonyx
You should consider using the Sage 50 SDK, it provides a safe and effective way of importing data into Sage's propitiatory database structure.If you inject straight into the Sage 50 structure you stand a very high risk of corrupting it as Sage built it based on a flat file database structure.
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...
6 Nov 2012 by Sergey Alexandrovich Kryukov
Of course this is possible, but you should understand that the Web is pure client-server, so it won't give you any notification unless you program the deployment process this way, only if you can access the programming of this process. That said, if you want to download newer versions from the...
9 Apr 2016 by Mohamed Hamdy
A boring talk about What’s really going on at runtime...
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...
2 May 2011 by Parallel Patterns
Introducing Memory Model in the context of .NET platform
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...
11 Feb 2013 by P_Dash
Yeah, requirements like this comes in case of Services which depend on multiple resources.I'd suggest you the following points, implementing which you could achieve your desired result:1-In ServiceContract use the following SessionMode attribute: ...
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...
4 Aug 2012 by Christian Graus
If you want it to appear as a normal folder, then yes, it's a shell extension.
17 Feb 2014 by Sander Rossel
Hi all,I have a question about marshalling.The wikipedia page about marshlling (and other pages and articles across the web) describe marshalling as being similiar to serialization, transforming an object into a format that is suited for transporting data to other processes.That is...
17 Feb 2014 by Pete O'Hanlon
Marhalling tends to be the term used to describe the process of transforming data so that it can either be stored (i.e., marshalling data), or moved. So, when you hear about an event being marshalled, what this means (in effect) is transforming the event so that it can be moved over threads - in...
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...
11 Apr 2011 by Nikolay Unguzov
Hi,I want to replicate Appointments between Outlook and my custom application. Can you point me to some pattern or algorithm for merge (2-way) replication? Now I have a working Push replication, but I need help for 2-way and especially dealing with deleted items.Thanks!
21 Feb 2014 by Tharaka MTR
Hi, Please see below article, http://msdn.microsoft.com/en-us/sync/bb887608[^]And it says, Sync Framework supports the ability to encrypt data as it travels between databases. On the corporate side, SQL Server 2008 as well as existing IIS security can be leveraged for user...
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...
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...
5 Sep 2011 by Pradeep Shukla
No..there is no automatic way of handling it. If you do not want to use compact db, you can use Dictionary object or a Hashtable to store this data locally but it can not get updated on it's own. You need to re-start the application to load the fresh data.I believe you do not have much...
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...
27 Mar 2013 by tzych
See approved solution below - because the file is being accessed from two different user spaces, the Mutex needs to be declared as Global. Thanks to Andreas for the solution!=========================OK, I have a log file that can be written to by multiple processes. I'm trying to protect...
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,...
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...
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...
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...
6 Nov 2015 by Trimantra Software Solution
I have a Office 365 site.In that I have Document Library. Sync and open with Explorer provides two way sync.But I want one way sync.. means whenever user will add data to Document Library, it should be updated in File Explorer.And no operation should perform on Document Library, if...
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...
6 May 2019 by OriginalGriff
Talk to the authors: if you go to your link page, you will find a line: Support questions: Stack Overflow[^] Follow the link, and ask them.
4 Mar 2016 by Member 12273100
Hi! i want to create a tiny php script, which suppose is to copy data from one table (firebird db) into mysql one. My current code is below - currently it only displays one column but just like i mentioned - i want to copy its values to second db.Few questions/issues: - how to grab table in...
13 Feb 2013 by essence
Make your synchronizion easier by using Read/Write extensions.
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...
24 Dec 2012 by Zoltán Zörgő
First of all, it could depend on the DBMS. You have not specified what you are using.You wrote, that data will be uploaded from branch office to the main office. So let's suppose there is no data sent back to the branches. And even less you don't need to sync data between branch offices....
13 Dec 2018 by Michael Chourdakis
A mutex with shared/exclusive access with upgrade/downgrade capability
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...