将sqlite db同步到sqlserver db [英] Sync sqlite db to sqlserver db

查看:426
本文介绍了将sqlite db同步到sqlserver db的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用asp.net web api服务将sqlite数据库与sql server数据库同步。任何人都可以帮我一个示例代码。提前致谢。



我尝试了什么:



sync sqlite db to sqlserver db

解决方案

我的第一个建议是将你的问题分解成更小的部分。



*第1步 - 从c#连接到SQL Lite

Google [ ^ ]



从C#连接和使用sqlite数据库的最佳方法是什么 - Stack Overflow [ ^ ]



在C#应用程序中使用SQLite [ ^ ]



在C#中开始使用SQLite - Tigran的博客 [ ^ ]



*第2步 - 使用c#连接到Sql Server - 这很荒谬,所以我只会给你留下一个谷歌搜索



连接到sql server c# [ ^ ]



*步骤3 - 对sql lite运行查询,将结果存储在列表中

*步骤4 - 从sql lite中获取结果,并将它们插入到sql server中





您还有其他选择。我会给你留下你应该搜索的谷歌搜索结果。



同步sqlite和sql server [ ^ ]



http://www.codeproject.com/Questions/869187/How-to-sync-between-sqlite-and-remote-ms -sql-serve [ ^ ]



此答案中的某些内容可为您提供所需内容。这不一定是一项快速任务,因此您必须付出一些努力并花费一点脑力来让两个DB相互通信。现在,如果你进入你的合并并遇到问题,请随时回过头来清楚解释你的问题和一些代码示例(如果适用),这样我们就知道你至少试图解决这个问题。 / BLOCKQUOTE>

I need to sync sqlite database with sql server database using asp.net 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

解决方案

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

* Step 1 - Connect to SQL Lite from c#
Google[^]

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[^]

http://www.codeproject.com/Questions/869187/How-to-sync-between-sqlite-and-remote-ms-sql-serve[^]

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.


这篇关于将sqlite db同步到sqlserver db的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆