我想从sql server 2008导出用户选择的数据,并使用c#导出sqlite [英] i want to export user selected data from sql server 2008 and export in sqlite using c#
本文介绍了我想从sql server 2008导出用户选择的数据,并使用c#导出sqlite的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,
i希望从sql server 2008导出用户选择的数据并使用c#windows应用程序导出sqlite
谢谢,
Abhimanyu Rawat
解决方案
有很多方法可以做到这一点,其中一种低效的方法是将它插入循环中
step1)首先从sql server 2008中选择数据并将其加载到datatable中
step2)现在运行一个循环< br $> b $ b
datatable dt = new datataable();
dt = obj_getdatatable( select * from tbl)
int i = 0 ;
while (!(i == dt.rows.count))
{
// 现在运行插入querry以插入到sql lite DB中。
i ++;
}
Messagebox.Show( 已成功插入..)
----------另一种方式是使用批量插入
----- ----
转换SQL Server DB到SQLite DB [ ^ ]
如果选择了USER,则需要自己编写。
我认为在Sqlite和MS SQL之间迁移数据并不容易。
我建议你创建一个 web服务 .NET,可以与两个客户端进行交互。然后,您可以轻松地在跨平台应用程序之间迁移数据。
这里给出了一个转换器:将SQL Server DB转换为SQLite DB [ ^ ]。
但是我还是强烈建议你去寻求服务。 :)
-KR
Hello,
i want to export user selected data from sql server 2008 and export in sqlite using c# windows application
Thanks,
Abhimanyu Rawat
解决方案
there are many ways to do it, one of the inefficient way is to insert it in a loop
step1) first select the data from sql server 2008 and load it in datatable
step2) now run a loop
datatable dt = new datataable(); dt = obj_getdatatable("select * from tbl") int i = 0; while(!(i == dt.rows.count)) { //now run an insert querry to insert into sql lite DB. i++; } Messagebox.Show("Sucessfully Inserted..")
---------- another way is using bulk insert
---------
Convert SQL Server DB to SQLite DB[^]
For USER selected, you need to write your own.
I don't think it's easy to migrate data between Sqlite and MS SQL.
I'd suggest you to create a web service in .NET, that can interact with both the clients. And then you can easily migrate data among cross platform application.
One converter is given over here : Convert SQL Server DB to SQLite DB[^].
But still I'd strongly recommend you to go for services. :)
-KR
这篇关于我想从sql server 2008导出用户选择的数据,并使用c#导出sqlite的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文