-
Apr 15th, 2021, 02:32 PM
#1
Thread Starter
Hyperactive Member
Converting application from MS Access to SQLite database
I have been using MS Access as the back-end database for all my VB.NET projects and now I'd like to convert one of those projects to use SQLite as its back-end database.
I found an on-line tool that converts an ACCDB file to an SQLite file.
https://www.rebasedata.com/convert-a...-sqlite-online
I downloaded the SQLite Browser so that I could take a look at the newly converted SQLite file. The tables, fields, etc. all seem to be properly converted.
https://sqlitebrowser.org/about/
My question...is it just a matter of changing the application's connection string from an MS Access string to one that is for the SQLite database?
I know that I'm at the beginning of a new "adventure" with this project, and hoping that it will not be too onerous. Any advice would be most appreciated
-
Apr 15th, 2021, 02:47 PM
#2
Re: Converting application from MS Access to SQLite database
Yes... but... that's without seeing what your queries looks like. It's possible that you may need to change some of the queries to suit SQLite. Or, you may not. I don't know. But any changes you do encounter shouldn't be a huge deal. But it also depends on what that query does and how it does it. I'd go ahead and change the connection string, and then run through the app and see what queries fail... go from there. See what fials and why, and just fix them as you go.
-tg
-
Apr 15th, 2021, 02:54 PM
#3
Re: Converting application from MS Access to SQLite database
I would expect that you likely WILL have to change something about your queries. Older Access doesn't use named parameters, and I wouldn't expect accdb to do so, either. In that case, if you are using parameters, then those might change, and for the better. They might not, too, depending on how you wrote the queries. Another difference might be the delimiters used on dates and GUID fields, if you have either in a query. Still, it shouldn't be a terrible burden.
My usual boring signature: Nothing
-
Apr 15th, 2021, 08:02 PM
#4
Thread Starter
Hyperactive Member
Re: Converting application from MS Access to SQLite database
Do I need to download/install anything else to use SQLite in my app (other than converting my ACCDB file)? NuGet, GetHub, etc.? I’m hoping that for a laptop with 1TB of SSD memory, the SQLite “footprint” is pretty small.
-
Apr 15th, 2021, 08:32 PM
#5
Re: Converting application from MS Access to SQLite database
If you have been using an ACCDB file then you will be using System.Data.OleDb types and the ACE OLE DB provider to connect to the database. If you want to just change your connection string then you will need a SQLite OLE DB provider. Ideally though, you'd switch from OleDb to a dedicated SQLite ADO.NET provider, which would mean installing an appropriate NuGet package. There are packages available from both SQLite and Microsoft.
-
Apr 16th, 2021, 06:25 AM
#6
Thread Starter
Hyperactive Member
Re: Converting application from MS Access to SQLite database
Looking at NuGet packages for SQLite, and there are several to choose from. Other than the obvious 32-bit vs. 64-bit criteria, which one should I install?
https://www.nuget.org/profiles/SQLite
My application is a 64-bit Windows Forms project.
Last edited by Mark@SF; Apr 16th, 2021 at 06:29 AM.
-
Apr 16th, 2021, 08:54 AM
#7
Re: Converting application from MS Access to SQLite database
Originally Posted by Mark@SF
which one should I install?
The first one.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|