<div class="meta" robots="noindex">

</div>

Method

# SQLiteDatabase.AttachDatabase

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2019r2. Please use `SQLiteDatabase.AddDatabase<sqlitedatabase.adddatabase>` as a replacement.

</div>

## Description

Attaches the SQLite database referred to by *file* to the database. It gives the newly attached database the name *databaseName*.

## Notes

When a database has been attached, it is possible to do cross-database queries. In order to attach an encrypted database, you must pass the correct password for the database to be attached.

You should prefix all SQL queries to tables in the attached database with the *databaseName*.

## Compatibility

All project types on all supported operating systems.
