After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 470879 - Check if sqlite db is 2.1 and change to 3 if needed
Check if sqlite db is 2.1 and change to 3 if needed
Status: RESOLVED FIXED
Product: chronojump
Classification: Other
Component: chronojump
unspecified
Other All
: Normal blocker
: ---
Assigned To: Xavier de Blas
Xavier de Blas
Depends on:
Blocks:
 
 
Reported: 2007-08-27 22:55 UTC by Xavier de Blas
Modified: 2007-09-19 16:53 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Xavier de Blas 2007-08-27 22:55:18 UTC
Seems that on linux (mono) and on all chronojump versions we used always version 3, but on windows it was 2.1 (on .net) until now: 3 (on mono). The best will be detect with any select and a try{} catch{}, and then try to dump like:

sqlite old.db dump | sqlite 3 new.db

but do it on the code. If is not possible try to call external programs (sqlite.exe) (sqlite3.exe) redistributed with chronojump, or to call to a batch program that does this piping.

On linux we can use also the try {} catch {} and show a message to user telling what packages to install and writing the piped comands.
Comment 1 Xavier de Blas 2007-09-18 21:59:03 UTC
On linux is working now!
on windows there's a hang
Comment 2 Xavier de Blas 2007-09-19 16:53:00 UTC
On windows crashes this:

ProcessStartInfo ps = new ProcessStartInfo(myPath + Path.DirectorySeparatorChar + sqliteStr , sqlite2File + " .dump");

ps.UseShellExecute = false;
ps.RedirectStandardOutput = true;
string output = "";
using(Process p = Process.Start(ps)) {
  //TODO: this doesn't work on windows (it gets hanged)
  p.WaitForExit();
  output = p.StandardOutput.ReadToEnd();
}


Fixed with: convert_database.bat
also in linux with convert_database.sh