Hi,
Yes, SQLite database with around 20 tables. The initial size is small but will increase by time, as it is the part of a surveillance database which is updated quarterly in a year.
"You can create two set of connection objects, command objects and reader objects.
One set for each database.
Then read the data row by row and add it to the target database."
I have done it in the same way with insertion (for new rows) and update (for existing rows) option and its working fine. The purpose is to backup only the tables being changed depending upon a flag. I was looking is there any other smart way.
"You can also read the complete table with cmd.ExecuteTable and then save it with Connection.createSQLTable."
For The 2nd option I tried like:
If btnclose.Text = "Backup" Then
cmd.CommandText = "select * from rf_disease"
cmd.ExecuteTable("table5",0)
' con1.Open("data source =\SD card\kdss_db" )
con1.Open("data source =C:\Documents AND Settings\mozaharul\Desktop\test")
cmd1.CommandText = "drop table rf_disease"
cmd1.ExecuteNonQuery
con1.CreateSQLTable("table5","rf_disease")
Msgbox("Data saved in the SD card")
con1.Close
End If
It works fine but the problem is that, for all numeric field, the data type is changed to real one. How to preserve the data type of the target table intact ?
regards,