SQLite to Access: Import Tables into .accdb

Every table of a .db file into one Access database, with the columns given the types Access insists on - and the old integer key promoted to a real AutoNumber.

Download DBCopier — free trial

Version 3.1.2 · Windows, Linux, macOS · 30-day free trial, then $129 one-time · runs fully offline

DBCopier importing SQLite tables into an Access database - the run list with rows per table and the convert progress at 100%

How to Import SQLite Tables into Access

Step 1: Open the SQLite file

The .db file is the whole database - tables and views listed with their row counts, and a query can stand in for a table.

Step 1 screenshot

Step 2: Pick the Access database

An existing .accdb or a new one the run creates. Writing needs the Access database engine on Windows, in the tool's bitness.

Step 2 screenshot

Step 3: Give every column an Access type

Text becomes Short Text (255) or Long Text, numbers become Integer / Double / Decimal, dates become Date/Time, and 0/1 becomes Yes/No.

Step 3 screenshot

Step 4: Load it and add the key

The run reports rows per table. Afterwards: mark the integer key as the primary key and - if new rows will be added - turn it into an AutoNumber.

Step 4 screenshot

What Access Insists On

SQLite accepts whatever arrives and sorts it out at read time. Access writes a schema, and a schema has opinions - this is the direction where the target is the strict one.

Text has a length. TEXT in SQLite has none; Access's Short Text stops at 255 characters, so anything longer has to be mapped to Long Text. A wrong choice here truncates rather than fails.

There is no date type in the source. A SQLite date is text or an epoch integer with a convention behind it; Access has one real Date/Time type, and the mapping has to know the convention to use it.

Booleans are Yes/No, stored as -1 and 0. A column mapped from INTEGER 0/1 arrives readable, and then surprises whoever compares it with a value from Access itself.

There is no converter online for this direction, and it is a technical fact rather than a policy: writing an .accdb needs the Access database engine on the machine that writes it, so a file has to be produced somewhere with Windows and the engine installed. This runs as a desktop task with a free 30-day trial, fully offline - the database never leaves the machine, which for an Access file is usually the requirement anyway.

SQLite to Access — Type Mapping

Each SQLite storage class has to become something Access can declare:

SQLiteAccessWhat to decide
TEXT, short valuesShort Text (255)the common case - and the one that truncates if a row turns out longer
TEXT, long valuesLong Textmemo-style content has no length limit - map by what the column actually holds
INTEGER PRIMARY KEYAutoNumberthe one thing Access adds: new rows get the next key without help
INTEGERNumber (Long Integer)a plain number - no counter behind it
REAL / NUMERICDouble or DecimalDecimal keeps money exact; Double is what SQLite's REAL already is
date stored as ISO textDate/Timethe mapping converts it - provided the column really is ISO and not a local format
0 / 1Yes/NoAccess shows true/false and stores -1/0; the values read differently, the meaning does not
BLOBOLE Objectimages travel; anything the OLE wrapper cannot describe is better left in a folder

Two things are not copied because Access keeps them itself: the rowid order (row order in a table is not a property either database guarantees) and SQLite's indexes, which are rebuilt as Access indexes on the columns the queries use.

AutoNumber, and Why This Direction Feels Better

The pleasant part of this direction is that Access gives something back: a column mapped from INTEGER PRIMARY KEY can be declared AutoNumber, so the primary keys stop being a value somebody has to invent.

The old keys are copied as they are, which keeps every existing relationship readable; from the next insert onwards Access increments. That combination is what a cut-over wants - identical history, self-maintaining future.

The constraint to remember is the .accdb ceiling of 2 GB per database, which includes the OLE objects. A SQLite file that grew past that because of stored images will not fit in one Access file, and the images are the part to move out.

SQLite to Access — Quick Facts

Source
a SQLite 3 .db file: tables, views or a query
Target
Access 2000–365: an existing .accdb / .mdb, or one the run creates
Keys
an INTEGER PRIMARY KEY can become an AutoNumber - new rows increment on their own
Text limits
Short Text stops at 255 characters; Long Text has no practical limit
Database size
2 GB per .accdb, OLE objects included
CLI
the saved task runs without a window, one command and one log

Common Pitfalls when Importing into Access

  • Short Text truncates silently: a value longer than 255 characters disappears past the limit unless the column is mapped to Long Text.
  • Yes/No is -1, not 1: the import writes true/false correctly, and any later query comparing with 1 or 0 has to know Access's convention.
  • A non-ISO date becomes text: map a date column whose values read 15/03/2024 and Access stores a string that sorts and filters wrongly.
  • AutoNumber is a decision, not a default: declare it, and Access keeps the old keys and increments from the highest; leave it a plain number and new rows get nothing.
  • 2 GB is the whole file: a SQLite database that grew on stored images will not fit - OLE objects count against the same ceiling.
  • A lock file appears next to the database: .laccdb while it is open; a copy taken during a write can be inconsistent, so close it first.

Which Searches Land Here

This page imports SQLite tables into an Access database. The neighbouring searches below mean a different direction or a different target:

What you searchedMeaningPage
sqlite to access, convert sqlite to access, sqlite to accdbthis pageyou are on it
access to sqlite, accdb to sqlite sqlite to accessthe reverse directionAccess to SQLite
sqlite to dbf, sqlite to dbasea DBF file as the targetSQLite to DBF
dbf to access, foxpro to accessa DBF/FoxPro source insteadDBF to Access
sqlite to sql server, sqlite to mysqla server database as the targetSQLite to SQL Server
excel to access, csv to accessa spreadsheet or text file as the sourceExcel to Access

One query in SQLite decides most of the mapping: SELECT max(length(col)) FROM tbl for every text column - anything above 255 belongs in Long Text, and that is the difference between a complete import and a truncated one.

Verify Three Things After the Import

  • Row counts per table against SQLite's count(*) - and with the width decision above, a short count means rows were rejected.
  • The longest text value: find it with max(length(col)) in SQLite, then read that row in Access - truncation shows here first.
  • The key: the highest old key should be present, and the next insert in Access should increment past it - that is AutoNumber working with the imported history.

Frequently Asked Questions

How do I import a SQLite database into Access?
Open the .db file, choose the Access database, map every column to an Access type and run it. All tables can go into the same .accdb.
Can the old integer key become AutoNumber?
Yes - mapped from INTEGER PRIMARY KEY it keeps the existing values and increments for new rows.
Why did long text get cut off?
Access's Short Text stops at 255 characters. Map that column to Long Text; the import does not warn once it has a type.
How are SQLite dates handled?
If the column holds ISO-8601 text, map it to Date/Time and Access converts it. A local format such as 15/03/2024 stays text.
What about 0/1 columns?
They can become Yes/No. Access shows true/false and stores -1/0, so queries written against 1 will need adjusting.
Do BLOB columns come across?
They can, as OLE Objects. They also count against the 2 GB database limit, so large media is usually better kept in a folder.
Do I need Access installed?
No. Writing an .accdb uses the Access database engine on Windows, and its bitness has to match the tool's.
Can it keep the two in step?
Yes - save the task, match on the key and run it on a schedule; the .accdb must not be open for writing during the run.

Download Withdata DBCopier Now

Start importing SQLite tables into Access in seconds - free trial for Windows, Linux and macOS.

$75 one-time · volume discounts to $55 · 30-day money-back · pricing & licence terms

Download Free Trial