Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
i want to export user selected data from sql server 2008 and export in sqlite using c# windows application

Thanks,
Abhimanyu Rawat
Posted

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

C#
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

---------
 
Share this answer
 
v2
Convert SQL Server DB to SQLite DB[^]


For USER selected, you need to write your own.
 
Share this answer
 
v2
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
 
Share this answer
 

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