SQL support is built as part of the default build on Windows. For information on the build instructions, see Building Berkeley DB for Windows .
The SQL library is built as libdb_sql50.dll in the Release mode or libdb_sql50d.dll in the Debug mode.
An SQL command line interpreter called db_sql_shell.exe is also built.
Both libdb_sql50.dll and libdb_sql50d.dll are compatible with sqlite3.dll. You can rename libdb_sql50.dll to sqlite3.dll and db_sql_shell.exe to sqlite3.exe, and use these applications as a replacement for the standard SQLite binaries with same names.
The Berkeley DB SQL API provides extensions such as full text search and R-Tree index. To enable these extensions, do the following:
SQLITE_ENABLE_FTS3 or SQLITE_ENABLE_RTREE in Preprocessor Definitions of the db_sql project.
See the SQLite Documentation for more information on full text search and R-Tree.
This section describes the steps to build the JDBC driver.
File->Add->Existing Project.
build_windows/db_sql_jdbc.vcproj and add it to the Berkeley_DB solution.
This adds the db_sql_jdbc Visual Studio project to the Berkeley_DB solution file.
db_sql_jdbc project in Visual Studio.
You can test the build by entering the following commands from the db\build_windows\Win32\Debug directory:
| javac -cp ".;jdbc.jar" -d . ..\..\..\sql\jdbc\test3.java |
| java -cp ".;jdbc.jar" test3 |
This section describes the steps required to build the ODBC driver.
To configure your system prior to building the ODBC driver, do the following:
File->Add->Existing Project.
build_windows/db_sql_odbc.vcproj and add it to the Berkeley_DB solution.
This adds the db_sql_odbc Visual Studio project to the Berkeley_DB solution file.
db_sql_odbc project. This can be done by right-clicking the db_sql_odbc project in the project explorer panel, and selecting build.The sqlite3odbc.dll, libdb_sql50.dll and libdb50.dll files are now built.
Copy the dll files built in the Building the Library section to the Windows system folder.
The Windows system folder is different on different systems, but is often C:\WINDOWS\System32.
The steps to verify that the installed driver works are as follows:
Windows start->Microsoft Data Access SDK 2.8->ODBCTest (Unicode, x86).Conn->Full Connect... menu item.SQLite3 Datasource and click OK.Stmt->SQLExecDirect... menu item.CREATE TABLE t1(x); in the Statement text box and click OK.