public class SqlFileEmbedder extends Object
Suitable for using as a template.
This class also serves as an example of using RCData to allow your application users to store JDBC access information in a convenient text file.
main(String[]),
SqlFile,
RCData| Constructor and Description |
|---|
SqlFileEmbedder(File rcFile,
String urlid)
Instantiates SqlFileEmbedder object and connects to specified database.
|
| Modifier and Type | Method and Description |
|---|---|
void |
executeFiles(String[] fileStrings)
Your own classes can use this method to execute SQL files.
|
Connection |
getConn()
For applications that use a persistent JDBC connection, this class can
be used to encapsulate that connection.
|
static void |
main(String[] sa)
Run
|
public SqlFileEmbedder(File rcFile, String urlid) throws Exception
N.b., you do not need to use RCData to use SqlFile. All SqlFile needs is a live Connection. I'm using RCData because it is a convenient way for a non-contained app (i.e. one that doesn't run in a 3rd party container) to get a Connection.
rcFile - Fileurlid - StringException - on any problempublic Connection getConn()
public static void main(String[] sa) throws Exception
java SqlFileEmbedderto see Syntax message.
sa - String[]Exception - on any problempublic void executeFiles(String[] fileStrings) throws IOException, org.hsqldb.cmdline.SqlToolError, SQLException
See source code for the main(String[]) method for an example of calling this method.
fileStrings - String[]IOException - on io problemsorg.hsqldb.cmdline.SqlToolError - on SQL Tool problemsSQLException - on SQL problemsmain(String[])Copyright © 2001 - 2017 HSQL Development Group.