Click here to Skip to main content
15,072,051 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I need to sync sqlite database with sql server database using web api service. Can any one please help me with an example code. Thanks in advance.

What I have tried:

sync sqlite db to sqlserver db
Updated 24-Sep-16 6:16am
[no name] 24-Sep-16 6:59am
"Gimme code" is not a question or a problem. It's very rude as well.
What you have tried and where is the issue?

1 solution

My first suggestion is break down your problem into smaller pieces.

* Step 1 - Connect to SQL Lite from c#

What is the best way to connect and use a sqlite database from C# - Stack Overflow[^]

Using SQLite in your C# Application[^]

Getting started with SQLite in C# – Tigran's Blog[^]

* Step 2 - Connect to Sql Server in c# - This is ridiculous well documented so I'll just leave you with a google search

Connect to sql server c#[^]

* Step 3 - Run queries against sql lite, store the results in a list
* Step 4 - Take results from sql lite, and insert them into sql server

You also have other options as well. I'll leave you with google results you should have searched for.

sync sqlite and sql server[^][^]

Something from this answer should provide you with what you need. This isn't necessarily a quick task so you will have to put some effort to it and expend a little brain power to make your two DB's communicate with each other. Now if you get into your merging and have an issue, feel free to come back with a clear explanation of your issue and some code samples (if applicable) so that way we know that you've at least attempted to tackle this problem.

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