SQLite in Java

SkyHog

Touchdown! Greaser!
Joined
Feb 23, 2005
Messages
18,510
Location
Middle of nowhere Texas
Display Name
Everything Offends Me
Home Airfield
KLUD
Anyone have any familiarity with SQLite? I'm trying to do some database stuff with Java, and can't seem to get the driver to work with JDBC.

I wish I could give better information that that, but I can't because it doesn't make sense.

As an alternative, does anyone know of a decent way to create/modify/read a database without running a server? So far, it seems impossible aside from using SQLite, which is insane, since all I want to do it write data to a database, and then read it back out.
 
A database is a FILE. You can save it locally or remotely.


[ Add Database to Application using the IDE ]
1. Build your application and after it is built, copy the path to your executable
2. Select Project | Add | Database | New REAL SQL Database
--- Save As dialog opens
3. In Save In field, make sure the path matches the path to your executable.
4. In File Name field, enter the database appropriately for your application.
5. Click Save dialog button to create your database file.
--- Database icon is added to list in Project tab of your application.
--- Database file is added to file system.

[ Add table and 2 columns to new database using the IDE ]
1. In Project tab, double-click on Database icon.
--- Database (blank) schema is opened.
2. In schema, click on Add Table tool.
--- "Untitled" is added to Tables column.
3. In Property | Value column, change name of table to "MainTable". Press Enter.
--- In schema, table name is changed and selected.

4. Click "Add Column" toolbar button.
--- "Untitled" is added to center area (fields).
5. In Property | Value column, change name of field to "MainTableId".
6. Change Type to Integer
7. Enable Primary Key
8. Enable Mandatory
9. Click "Add Column" toolbar button.
--- "Untitled" is added to fields.
10. Change Untitled to "Field1". Change type to Text
11. In Project tab, click on Save toolbar button.



Check the help files for SQL
 
A database is a FILE. You can save it locally or remotely.


[ Add Database to Application using the IDE ]
1. Build your application and after it is built, copy the path to your executable
2. Select Project | Add | Database | New REAL SQL Database
--- Save As dialog opens
3. In Save In field, make sure the path matches the path to your executable.
4. In File Name field, enter the database appropriately for your application.
5. Click Save dialog button to create your database file.
--- Database icon is added to list in Project tab of your application.
--- Database file is added to file system.

[ Add table and 2 columns to new database using the IDE ]
1. In Project tab, double-click on Database icon.
--- Database (blank) schema is opened.
2. In schema, click on Add Table tool.
--- "Untitled" is added to Tables column.
3. In Property | Value column, change name of table to "MainTable". Press Enter.
--- In schema, table name is changed and selected.

4. Click "Add Column" toolbar button.
--- "Untitled" is added to center area (fields).
5. In Property | Value column, change name of field to "MainTableId".
6. Change Type to Integer
7. Enable Primary Key
8. Enable Mandatory
9. Click "Add Column" toolbar button.
--- "Untitled" is added to fields.
10. Change Untitled to "Field1". Change type to Text
11. In Project tab, click on Save toolbar button.



Check the help files for SQL

Thanks! I hadn't had a chance to look at RealSQL in detail yet. Your help will make this much easier!
 
Back
Top