db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myrn...@apache.org
Subject svn commit: r547071 - /db/derby/docs/trunk/src/tools/rtoolsijproprefdatasource.dita
Date Thu, 14 Jun 2007 00:50:43 GMT
Author: myrnavl
Date: Wed Jun 13 17:50:42 2007
New Revision: 547071

URL: http://svn.apache.org/viewvc?view=rev&rev=547071
Log:
DERBY-2733: adding an example to ij.dataSource documentation to indicate 
  the protocol may be omitted in a connect with J2ME when the datasource
  is known.

Modified:
    db/derby/docs/trunk/src/tools/rtoolsijproprefdatasource.dita

Modified: db/derby/docs/trunk/src/tools/rtoolsijproprefdatasource.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/tools/rtoolsijproprefdatasource.dita?view=diff&rev=547071&r1=547070&r2=547071
==============================================================================
--- db/derby/docs/trunk/src/tools/rtoolsijproprefdatasource.dita (original)
+++ db/derby/docs/trunk/src/tools/rtoolsijproprefdatasource.dita Wed Jun 13 17:50:42 2007
@@ -34,7 +34,7 @@
 <codeblock>ij.dataSource=<varname>dataSourcename</varname>
 ij.dataSource.databaseName=<varname>databasename</varname>
 [ij.dataSource.createDatabase=create]</codeblock></refsyn>
-<example><title>Example</title> 
+<example><title>Example 1</title> 
 <p>In the following example, <codeph>ij</codeph> connects to a database
named 
 <codeph>sample</codeph> using an <codeph>EmbeddedDataSource</codeph>.
The 
 <codeph>sample</codeph> database is created if it does not already exist.
@@ -51,6 +51,25 @@
 ij version <ph conref="../conrefs.dita#vers/shortversionnumber"></ph> 
 CONNECTION0*
 * = current connection
+ij> </codeblock> </example>
+<example><title>Example 2</title> 
+<p>In the following example, <codeph>ij</codeph> starts using an <codeph>EmbeddedSimpleDataSource</codeph>,
then creates a database named <codeph>smalldb</codeph> using the 
+<codeph>connect</codeph> command, specifying <codeph>;create=true</codeph>
to create the
+database if it does not already exist.
+</p>
+<codeblock>
+<varname>#
+# If your application runs with a jvm supporting JSR169, you cannot use
+# org.apache.derby.jdbc.EmbeddedDataSource, but you can use 
+# org.apache.derby.jdbc.EmbeddedSimpleDataSource instead.
+# Because specifying a protocol would automatically attempt to load a driver,
+# when using ij.dataSource you should omit the protocol on connect.
+# This is especially relevant with JSR169 because java.sql.Driver is not supported.
+#</varname><b>
+java -Dij.dataSource=org.apache.derby.jdbc.EmbeddedSimpleDataSource
+  org.apache.derby.tools.ij</b>
+ij version <ph conref="../conrefs.dita#vers/shortversionnumber"></ph> 
+ij> connect 'smalldb;create=true'; 
 ij> </codeblock> </example>
 <section>For more information about DataSources, refer to the JDBC documentation
 and "Using <ph conref="../conrefs.dita#prod/productshortname"></ph> as a



Mime
View raw message