0

my project manager asked me to do the following:

-backup data from mysql database that is on the server

-convert this data to sqlite

-add it to a windows form application that read from this sqlite new database

the target is to keep part of the database always linked to this c# windows application

I've read articles about backup data from mysql using c# and I don't expect to have problems

backup using mysqldump.exe 1

backup using mysqldump.exe 2

backup using mysqldump.exe 3

How can I convert this mysql dump file into sqlite and load the data to the c# using the sqlite memory and then save it so the application will use this sqlite database each time it runs. All of these steps must be done by the c# windows application itself with a button or something similar.

3
  • 1
    I would do a GoogleSearch on how to convert MySQL over to Sqlite there are a lot of steps you have there so my best suggestion would be to start coding as well as start doing some research on the web Commented Jan 28, 2013 at 18:46
  • why can't you use a conversion tool.. sounds like the company you work for is being cheap sql conversion tools start looking here Tony Commented Jan 28, 2013 at 18:50
  • forums.mysql.com/read.php?145,68269,92627#msg-92627 Commented Jan 28, 2013 at 18:51

1 Answer 1

0

IMO easiest way to do this, and how we do it: export the tables as CSV. Open them in excel. create an insert statement for the first row in the excel sheet using variables for the cells, append that as an extra column. click and drag that down to repeat that statement on every row.

Copy that generated column, and bring it into your sqlite database browser, and run that huge statement.

the statement should look like : ="INSERT INTO newTable VALUES('" &A2&"','" &B2&"');"

don't make it any harder then it should be :P

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.