Update of /cvsroot/firebird/client-java/src/etc
In directory sc8-pr-cvs1:/tmp/cvs-serv25927/src/etc
Modified Files:
Tag: Branch_1_0
faq.html
Log Message:
Index: faq.html
===================================================================
RCS file: /cvsroot/firebird/client-java/src/etc/faq.html,v
retrieving revision 1.7.2.1
retrieving revision 1.7.2.2
diff -b -U3 -r1.7.2.1 -r1.7.2.2
--- faq.html 19 Jul 2003 21:34:58 -0000 1.7.2.1
+++ faq.html 4 Aug 2003 19:11:09 -0000 1.7.2.2
@@ -12,7 +12,7 @@
<h1 ALIGN=CENTER><font size="6" style="font-size: 20pt"><a name="top"></a>Frequently
Asked Questions</font></h1>
<p ALIGN=CENTER><font size="4">JayBird JCA/JDBC Driver for Firebird</font></p>
-<P ALIGN=CENTER>- Last Updated 4/9/03 -<BR>
+<P ALIGN=CENTER>- Last Updated 8/1/03 -<BR>
</P>
<table width="90%" border="0" cellspacing="0" cellpadding="5">
<tr>
@@ -64,9 +64,10 @@
<p><a href="#38">38. Why do I see a "javax.naming.Referenceable"
error?</a></p>
<p><a href="#39">39. How do I use stored procedures with JayBird?</a></p>
- <p><a href="#40">40. How do I pass Database Parameter Buffer (DPB) parameters?</a></p>
- <p><a href="#dpb">41. How do I pass Database Parameter Buffer (DPB) parameters?</a></p>
- <p><a href="#codeexamples">42. Can you give me some code examples?</a></p>
+ <p><a href="#40">40. Why are VARCHAR Strings sometimes padded?</a></p>
+ <p><a href="#41">41. Can I use CachedRowSet with JayBird?</a></p>
+ <p><a href="#dpb">42. How do I pass Database Parameter Buffer (DPB) parameters?</a></p>
+ <p><a href="#codeexamples">43. Can you give me some code examples?</a></p>
</td>
<td> </td>
</tr>
@@ -121,95 +122,143 @@
in the src/etc folder.</P>
<P><FONT SIZE=4>The following optional features are NOT supported:</FONT></P>
<UL>
- <LI><P>Batch Updates.
- </P>
- <LI><P>Scrollable cursors.
- </P>
- <LI><P>Updatable cursors.
- </P>
- <LI><P>Ref, Clob and Array types
- </P>
- <LI><P>User Defined Types/Type Maps.</P>
-</UL>
-<P>The methods that support those features return SQLExceptions when used.<BR>
-</P>
-<P><FONT SIZE=4>In addition to the non supported features above, the
-following methods are not implemented:</FONT></P>
-<UL>
- <LI><P><FONT FACE="Courier, monospace">java.sql.ResultSetMetaData </FONT>
- </P>
+ The following optional features and the methods that support it are not implemented:
+ <li><b>Batch Updates.</b></li>
+ <ul>
+ <li>java.sql.Statement</li>
+ <ul>
+ <li>addBatch(String sql)</li>
+ <li>clearBatch()</li>
+ <li>executeBatch()</li>
+ </ul>
+ <li>java.sql.Statement</li>
+ <ul>
+ <li>addBatch()</li>
+ </ul>
+ </ul>
+ <li><b>Scrollable cursors.</b></li>
+ <ul>
+ <li>java.sql.ResultSet</li>
+ <ul>
+ <li>beforeFirst()</li>
+ <li>afterLast()</li>
+ <li>first()</li>
+ <li>last()</li>
+ <li>absolute(int row)</li>
+ <li>relative(int rows)</li>
+ <li>previous()</li>
+ </ul>
+ </ul>
+ <li><b>Updatable cursors.</b></li>
+ <ul>
+ <li>java.sql.ResultSet</li>
+ <ul>
+ <li>rowUpdated()</li>
+ <li>rowInserted()</li>
+ <li>rowDeleted()</li>
+ <li>updateXXX(....)</li>
+ <li>insertRow()</li>
+ <li>updateRow()</li>
+ <li>deleteRow()</li>
+ <li>refreshRow()</li>
+ <li>cancelRowUpdates()</li>
+ <li>moveToInsertRow()</li>
+ <li>moveToCurrentRow()</li>
+ </ul>
+ </ul>
+ <li><b>Cursors/Positioned update/delete</b></li>
+ <ul>
+ <li>java.sql.Statement</li>
+ <ul>
+ <li>setCursorName()</li>
+ </ul>
+ <li>java.sql.ResultSet</li>
+ <ul>
+ <li>getCursorName()</li>
+ </ul>
+ </ul>
+ <li><b>Ref, Clob and Array types.</b></li>
+ <ul>
+ <li>java.sql.PreparedStatement</li>
+ <ul>
+ <li>setRef(int i, Ref x)</li>
+ <li>setClob (int i, Clob x)</li>
+ <li>setArray(int i, Array x)</li>
+ </ul>
+ <li>java.sql.ResultSet</li>
+ <ul>
+ <li>getArray(int i)</li>
+ <li>getArray(String columnName)</li>
+ <li>getRef(int i)</li>
+ <li>getRef(String columnName)</li>
+ <li>getClob(int i)</li>
+ <li>getClob(String columnName)</li>
+ </ul>
+ </ul>
+ <li><b>User Defined Types/Type Maps.</b></li>
+ <ul>
+ <li>java.sql.ResultSet</li>
+ <ul>
+ <li>getObject(int i, java.util.Map map)</li>
+ <li>getObject(String columnName, java.util.Map map)</li>
+ </ul>
+ <li>java.sql.Connection</li>
+ <ul>
+ <li>getTypeMap()</li>
+ <li>setTypeMap(java.util.Map map)</li>
+ </ul>
+ </ul>
</UL>
-<P STYLE="margin-left: 2cm"><FONT FACE="Courier, monospace"> isReadOnly(i)<br>
- isWritable(i)<br>
- isDefinitivelyWritable(i)</FONT></P>
-
+<p>Excluding the unsupported features, the following methods are not yet implemented:</p>
+<ul>
+ <li><b>java.sql.Statement</b></li>
<ul>
- <li>
- <p><font face="Courier, monospace">java.sql.Statement</font> </p>
+ <li>cancel()</li>
</ul>
- <P STYLE="margin-left: 2cm"><FONT FACE="Courier, monospace"> setEscapeProcessing(boolean)<br>
- cancel() </FONT> </P>
- <UL>
- <LI>
- <P><FONT FACE="Courier, monospace">java.sql.PreparedStatement </FONT> </P>
- </UL>
-
-<P STYLE="margin-left: 2cm"><FONT FACE="Courier, monospace">setObject(index,object,type,scale)<br>
- setCharacterStream(i)<br>
- setDate(i,date,calendar)<br>
- setTime(i,time,calendar)<br>
- setTimestamp(i,timestamp,calendar) </FONT> </P>
- <UL>
- <LI>
- <P><FONT FACE="Courier, monospace">java.sql.ResultSet </FONT> </P>
- </UL>
-
-<P STYLE="margin-left: 2cm"><FONT FACE="Courier, monospace">getDate(i,calendar)<br>
- getTime(i,calendar)<br>
- getTimestamp(i,calendar)<BR>
- </font> </P>
+ <li><b>java.sql.CallableStatement</b></li>
<ul>
- <li>
- <p><font face="Courier, monospace">java.sql.Blob</font></p>
+ <li>registerOutParameter(int parameterIndex, int sqlType)</li>
+ <li>registerOutParameter(int parameterIndex, int sqlType, int scale)</li>
+ <li>wasNull()</li>
</ul>
- <P STYLE="margin-left: 2cm"><font face="Courier, monospace">
- java.sql.Blob.setBytes(long, byte[], int, int)<br>
- java.sql.Blob.setBytes(long, byte[])<br>
- java.sql.Blob.truncate(long)<br>
- java.sql.Blob.position(java.sql.Blob, long)<br>
- java.sql.Blob.position(byte[], long)<br>
- java.sql.Blob.getBytes(long, int)<br>
- java.sql.Blob.length()<br>
- </FONT>
- <BR>
-</P>
-<P><font size="4">The following methods are implemented but do not work as expected</font></P>
- <UL>
- <LI>
- <P><font face="Courier, monospace">java.sql.ResultSet </FONT></P>
- </UL>
-
-<P STYLE="margin-left: 2cm"><font face="Courier, monospace">get/setFetchSize()
- </FONT>-does nothing</P>
- <UL>
- <LI>
- <P><font face="Courier, monospace">java.sql.Statement </FONT></P>
- </UL>
-
-<P STYLE="margin-left: 2cm"><font face="Courier, monospace"> get/setFetchSize()</FONT>
- -does nothing <br>
- <font face="Courier, monospace">get/setMaxFieldSize() </FONT>-does nothing <br>
- <font face="Courier, monospace">get/setQueryTimeout() </FONT>-does nothing </P>
- <UL>
- <LI>
- <P><font face="Courier, monospace">java.sql.PreparedStatement </FONT></P>
- </UL>
- <P STYLE="margin-left: 2cm"><font face="Courier, monospace">setObject(index,object,type) </FONT>This method is supported
- but behaves as <font face="Courier, monospace">setObject(index,object)</FONT></P>
- <P><BR>
- <BR>
- </P>
- <hr>
+ <li><b>java.sql.Blob</b></li>
+ <ul>
+ <li>length()</li>
+ <li>getBytes(long pos, int length)</li>
+ <li>position(byte pattern[], long start)</li>
+ <li>position(Blob pattern, long start)</li>
+ </ul>
+</ul>
+<p>The following methods are implemented, but do not work as expected:</p>
+<ul>
+ <li><b>java.sql.Statement</b></li>
+ <ul>
+ <li>get/setMaxFieldSize does nothing</li>
+ <li>get/setQueryTimeout does nothing</li>
+ </ul>
+ <li><b>java.sql.PreparedStatement</b></li>
+ <ul>
+ <li>setObject(index,object,type) This method is implemented but behaves as
+ setObject(index,object)</li>
+ <li>setObject(index,object,type,scale) This method is implemented but behaves
+ as setObject(index,object)</li>
+ </ul>
+ <li><b>java.sql.ResultSetMetaData</b></li>
+ <ul>
+ <li>isReadOnly(i) always returns false</li>
+ <li>isWritable(i) always returns true</li>
+ <li>isDefinitivelyWritable(i) always returns true</li>
+ </ul>
+ <li><b>java.sql.DatabaseMetaData</b></li>
+ <ul>
+ <li>getBestRowIdentifier(i) always returns empty resultSet</li>
+ </ul>
+</ul>
+<UL>
+ <p>
+ </p>
+</UL>
+<hr>
<BR>
<P ALIGN=CENTER><FONT SIZE=4 STYLE="font-size: 16pt"><a name="3"></a><font size="5">3-
Where do I get JayBird?</font></FONT></P>
@@ -257,9 +306,9 @@
<LI>
<P>log4j-core.jar (if you want logging available)</P>
</UL>
-
<P><BR>
- </P>
+The firebirdsql-full.jar file has all of the needed files in one archive for
+ ease of use.</P>
<P>These archives are included in the binary package.<BR>
</P>
@@ -280,7 +329,7 @@
<P ALIGN=CENTER><a href="#top">return to top</a></P>
<P><BR>
- </P>
+</P>
<P>JayBird features built-in connection pooling. This is very useful because it
eliminates the need for external connection pooling routines like Poolman or
@@ -538,7 +587,8 @@
was used in versions before Tomcat 4.</P>
<P>To use JayBird with Tomcat you must put the jar files where your web apps
- can access them. Once they are available to you web apps you use JayBird
+ can access them. Once they are available to your web apps you use JayBird
+
in your servlets or beans just as you would in standalone programs.</P>
<P>If you have only one webapp using JayBird or you need to keep JayBird separate
@@ -547,12 +597,11 @@
<P>It is more likely that Firebird will be used by all of your web apps and Tomcat
itself. To have universal access to JayBird, put the jars in CATALINA_HOME/common/lib/.</P>
- <P>If you configure a JNDI entry in CATALINA_HOME/conf/server.xml to use FBDataSourceObjectFactory,
- and you configure DBCP connection pooling (in Tomcat 4.1.x or greater) only
- one connection pool is started for all web apps. However, some users have
- reported problems with DBCP under certain circumstances.</P>
-
-<P>To use JayBird's internal connection pooling, you can configure an FBWrapping
+ <P>A simple example web app that creates a Firebird database and does a few
+ transactions directly is included below. It is called test.</P>
+ <P>Below that is the same web app set up to use a DataSource and connection
+ pooling via DBCP. It is called dbTest.</P>
+ <P>To use JayBird's internal connection pooling, you can configure an FBWrapping
DataSource for pooling just as you would in a stand-alone program. If you put
a class for doing that in a servlet and start it when Tomcat is initialized,
you can share a pool among web applications. If you do this, take care to make
@@ -602,6 +651,711 @@
you must have the role "manager" in the USER_ROLES table under your
name.</P>
<P>See the Tomcat docs for more information.</P>
+ <P><font size="+2">Sample Web Apps</font></P>
+ <P>These examples assume that the username SYSDBA and password masterkey are
+ valid. These samples create and search for the database in /databases/test.gdb.
+ To use a different directory change those entries below. For windows change
+ /databases/test.gdb to c:\\databases\\test.gdb, for example.</P>
+ <P><font size="+1">Sample web app test:</font></P>
+ <P>To use this sample web app create a folder called "test" in the webapps
+ directory of your Tomcat installation. Put the HTML file below into a file
+ called index.htm inside the folder called test. Put the contents of the
+ XML file following this into test/WEB-INF/web.xml. Finally, put the contents
+ of the
+ jsp file
+ following
+ that into test/search.jsp. Start Tomcat and run test in your browser by calling
+ http://localhost/test/index.htm.</P>
+ <P><font size="+1">Put this in CATALINA_HOME/webapps/test/index.htm:</font></P>
+ <P><html><br>
+ <
+ head><br>
+ <
+ title>index.htm</title><br>
+ <
+ meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><br>
+ <
+ /head></P>
+ <p><body bgcolor="#CCCCFF" text="#000000"><br>
+ <
+ /p><br>
+ <
+ H1 align="center">Enter Name</H1><br>
+ <
+ /H1><br>
+ <
+ p>This demo of a simple web app will take the name you type above and
+ search<br>
+ a table called CUSTOMERS in a Firebird database named test.gdb using the JayBird<br>
+ JDBC<br>
+ driver.<br>
+ The table CUSTOMERS has two fields (columns): FIRST_NAME and LAST_NAME.</p><br>
+<
+ p>If the database or tables don't exist they will be created for you. You
+ will<br>
+ need to edit the Strings at the top of the file search.jsp to appropriate<br>
+ ones for your system.</p><br>
+<
+ p>If there are no entries with the same last name that you type in, the
+ program<br>
+ will add 3 so you will get some output: &quot;Aaron, Bob, and Calvin&quot;.</p><br>
+<
+ p>&nbsp;</p><br>
+<
+ form name="form1" method="post" action="search.jsp"><br>
+<
+ p align="center"><br>
+ Type a Last Name to search for here:<br>
+<input name="name" type="text" id="name"><br>
+ then click &quot;Submit&quot;.</p><br>
+<
+ p align="center"> <input type="submit" name="Submit" value="Submit"><br>
+<
+ /p><br>
+<
+ /form><br>
+<
+ p>&nbsp;</p><br>
+<
+ /body><br>
+<
+ /html></p>
+ <p> </p>
+ <p><font size="+1">Put this in CATALINA_HOME/webapps/test/WEB-INF/web.xml:</font></p>
+ <p><?xml version="1.0" encoding="UTF-8"?></p>
+ <p><br>
+< !DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application
+ 2.2//EN' 'http://java.sun.com/j2ee/dtds/web-app_2.2.dtd'></p>
+ <p><web-app><br>
+<session-config><br>
+<session-timeout><br>
+ 30<br>
+</session-timeout><br>
+</session-config><br>
+<welcome-file-list><br>
+<welcome-file>index.htm</welcome-file><br>
+</welcome-file-list><br>
+<
+ /web-app><br>
+ </p>
+ <p><font size="+1">Put this in CATALINA_HOME/webapps/test/search.jsp:</font></p>
+ <p><%@page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*,org.firebirdsql.management.*"%></p>
+ <p><html><br>
+ <
+ head><br>
+ <
+ title>search.jsp</title><br>
+ <
+ meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><br>
+ <
+ /head></p>
+ <p><body bgcolor="#CCCCFF" text="#000000"><p><br>
+ <
+ /p><br>
+ <
+ H1 align="center">Test Search</H1></p>
+ <p><%<br>
+ // Edit the strings below as needed for your system.</p>
+ <p>String DB_SERVER_URL = "localhost";<br>
+ int DB_SERVER_PORT = 3050;</p>
+ <p>// Use forward slashes here, even on Windows systems.<br>
+ String DB_PATH = "c:/databases";</p>
+ <p>String DB_NAME = "test.gdb";<br>
+ String DB_USER = "sysdba";<br>
+ String DB_PASSWORD = "masterkey";<br>
+ String DB_CONNECTION_STRING = "jdbc:firebirdsql:"+DB_SERVER_URL+"/"+DB_SERVER_PORT+":"+DB_PATH+"/"+DB_NAME;</p>
+ <p>String lastName = request.getParameter("name");</p>
+ <p>// To help you debug, you can set a session attribute to values indicating<br>
+ // the prograss through the web app, then use an HTTP monitor to see how
+ far <br>
+ // you have progressed.</p>
+ <p>// This stuff creates the database with the JMX management tools <br>
+ // if it doesn't already exist.<br>
+ FBManager fbManager = new FBManager();</p>
+ <p>fbManager.setServer(DB_SERVER_URL);<br>
+ fbManager.setPort(DB_SERVER_PORT);</p>
+ <p>fbManager.start();</p>
+ <p>fbManager.createDatabase(DB_PATH + "/" + DB_NAME, DB_USER, DB_PASSWORD);</p>
+ <p><br>
+ // Load the JayBird driver. This is OK for a test but your real web apps<br>
+ // should use a dataSource for efficiency and flexibility.<br>
+ Class.forName("org.firebirdsql.jdbc.FBDriver");</p>
+ <p>%><br>
+ Opening a connection with connection string: <%=DB_CONNECTION_STRING%><BR><BR><br>
+ <
+ %</p>
+ <p>// Get a connection to the database.<br>
+ Connection connRSFind = DriverManager.getConnection(DB_CONNECTION_STRING,
+ DB_USER, DB_PASSWORD);</p>
+ <p>// Back to HTML, show the user the LAST_NAME typed in.<br>
+ %><br>
+ <
+ p><br>
+ The user entered name is: <%=lastName%><br>
+ <
+ p><br>
+ <
+ %</p>
+ <p>String sqlString = "SELECT * FROM CUSTOMERS WHERE LAST_NAME = \'" +
+ lastName +"\'";</p>
+ <p>// Switch back to html so we can print out the sqlString on the web page.<br>
+ %></p>
+ <p>The SQL String is: <%=sqlString%><p></p>
+ <p><%<br>
+ PreparedStatement StatementRSFind=null;<br>
+ ResultSet RSFind=null;<br>
+ boolean resultException=false;<br>
+ boolean rsReady = false;</p>
+ <p>try<br>
+ {<br>
+ StatementRSFind = connRSFind.prepareStatement(sqlString);</p>
+ <p> RSFind = StatementRSFind.executeQuery();<br>
+ rsReady = RSFind.next();<br>
+ }<br>
+ catch(SQLException e1)<br>
+ {<br>
+ resultException = true; // Set a flag so that we know there was an error, not
+ just an empty result set.</p>
+ <p>%><br>
+ Could not find table, I'll try to add it: <%=e1.getMessage()%><BR><br>
+ <
+ %<br>
+ }</p>
+ <p>if (!rsReady || resultException)<br>
+ { // If there are no database entries with this last name, enter a few so the
+ user has something to look at.<br>
+ // Or, if there was an error, the table probably doesn't exist yet.</p>
+ <p> // try to create table CUSTOMERS, in case it doesn't exist yet.</p>
+ <p> if (resultException)<br>
+ {// The table CUSTOMERS probably doesn't exist, so we create it here.<br>
+ Statement statement2=null;</p>
+ <p> try<br>
+ {<br>
+ statement2 = connRSFind.createStatement();<br>
+ }<br>
+ catch(SQLException e2)<br>
+ {<br>
+ %><br>
+ Could not create statement2 with this connection! Check your database settings
+ in search.jsp: <%=e2.getMessage()%><BR><br>
+<
+ %<br>
+ }</p>
+ <p> if (statement2 != null)<br>
+ {<br>
+ try<br>
+ { // try to crate the table CUSTOMERS.<br>
+ sqlString = "CREATE TABLE CUSTOMERS(LAST_NAME VARCHAR(50), FIRST_NAME
+ VARCHAR(50))";<br>
+ statement2.execute(sqlString);<br>
+ statement2.close();<br>
+ }<br>
+ catch(SQLException e2a)<br>
+ {<br>
+ %><br>
+ Table CUSTOMERS already exists and we tried to create it again, or it could
+ not be created: <%=e2a.getMessage()%> <BR><br>
+<
+ %<br>
+ }<br>
+ }<br>
+ } // Table CUSTOZMERS should exist now, if it didn't before or things are really
+ messed up.<br>
+ else<br>
+ {<br>
+ %><br>
+ First attempt at getting a result set produced an empty result set.<BR><br>
+<
+ %<br>
+ }</p>
+ <p> // Insert some names into table CUSTOMERS. Either the table is new and
+ empty, or there were<br>
+ // no entries with the last name the user gave us, so we'll enter a few, so
+ the user has<br>
+ // something to look at.<br>
+ Statement statement3=null;</p>
+ <p> try<br>
+ {<br>
+ statement3 = connRSFind.createStatement();<br>
+ }<br>
+ catch(SQLException e3)<br>
+ {<br>
+ %><br>
+ Could not create statement3 with this connection! Check your database settings
+ in search.jsp: <%=e3.getMessage()%><BR><br>
+<
+ %<br>
+ }</p>
+ <p> if (statement3 != null)<br>
+ {<br>
+ try<br>
+ {<br>
+ sqlString = "INSERT INTO CUSTOMERS(LAST_NAME, FIRST_NAME) VALUES(\'"+lastName+"\',
+ 'Aaron')";<br>
+ %><br>
+ Executing SQL: <%=sqlString%><BR><br>
+<
+ %<br>
+ statement3.execute(sqlString);<br>
+ sqlString = "INSERT INTO CUSTOMERS(LAST_NAME, FIRST_NAME) VALUES(\'"+lastName+"\',
+ 'Bob')";<br>
+ %><br>
+ Executing SQL: <%=sqlString%><BR><br>
+<
+ %<br>
+ statement3.execute(sqlString);<br>
+ sqlString = "INSERT INTO CUSTOMERS(LAST_NAME, FIRST_NAME) VALUES(\'"+lastName+"\',
+ 'Calvin')";<br>
+ %><br>
+ Executing SQL: <%=sqlString%><BR><BR><br>
+<
+ %<br>
+ statement3.execute(sqlString);<br>
+ statement3.close();<br>
+ }<br>
+ catch(SQLException e3a)<br>
+ {<br>
+ %><br>
+ We could not enter data in table CUSTOMERS for some reason: <%=e3a.getMessage()%> <BR><br>
+<
+ %<br>
+ }<br>
+ }<br>
+ </p>
+ <p> // try again to get a result set.<br>
+ sqlString = "SELECT * FROM CUSTOMERS WHERE LAST_NAME = \'" + lastName
+ +"\'"; <br>
+ StatementRSFind = connRSFind.prepareStatement(sqlString);<br>
+ RSFind = StatementRSFind.executeQuery();<br>
+ rsReady = RSFind.next();<br>
+ }</p>
+ <p>int i = 0;</p>
+ <p>if (rsReady)<br>
+ {<br>
+ boolean done=false;<br>
+ while (!done)<br>
+ {<br>
+ i++;<br>
+ String RSFind_Last = (String) RSFind.getObject("LAST_NAME");<br>
+ String RSFind_First = (String) RSFind.getObject("FIRST_NAME");<br>
+ // display the names in the browser.<br>
+ %><br>
+ Name <%=i%>: <%=RSFind_First%> <%=RSFind_Last%> <BR><br>
+<
+ %<br>
+ done = !RSFind.next();<br>
+ } //End while loop</p>
+ <p> RSFind.close();<br>
+ }<br>
+ else<br>
+ {<br>
+ %><br>
+<
+ BR>The result set was empty. Check to be sure database is running and settings
+ in search.jsp are correct.<BR><br>
+<
+ %</p>
+ <p> }<br>
+ if (StatementRSFind != null)<br>
+ StatementRSFind.close();</p>
+ <p>if (connRSFind != null)<br>
+ connRSFind.close();</p>
+ <p>%></p>
+ <p></body><br>
+ <
+ /html><br>
+ </p>
+ <p><font size="+1">Sample web app dbTest:</font></p>
+ <P>This sample web app shows how to use a Fiorebird DataSource with Tomcat.
+ To use it, create a folder called "dbTest" in
+ the webapps directory of your Tomcat installation. Put the HTML file below
+ into
+ a file called index.htm inside the folder called dbTest. Put the contents
+ of the XML file following this into dbTtest/WEB-INF/web.xml. Put
+ the contents
+ of the jsp file following that into dbTest/search.jsp. Put the context
+ XML code after that into the conf/server.xml file of your Tomcat installation
+ just before the entry: </Host>. Start Tomcat and run dbTest in your browser
+ by calling http://localhost/dbTest/index.htm.</P>
+ <P><font size="+1">Put this in CATALINA_HOME/webapps/dbTest/index.htm:</font></P>
+ <P><html><br>
+< head><br>
+< title>index.htm</title><br>
+< meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><br>
+< /head></P>
+ <p><body bgcolor="#CCCCFF" text="#000000"><br>
+< /p><br>
+< H1 align="center">Enter Name</H1><br>
+< /H1><br>
+< p>This demo of a simple web app will take the name you type above and
+search<br>
+ a table called CUSTOMERS in a Firebird database named test.gdb using the JayBird<br>
+ JDBC<br>
+ driver.<br>
+ The table CUSTOMERS has two fields (columns): FIRST_NAME and LAST_NAME.</p><br>
+< p>If the database or tables don't exist they will be created for you.
+You will<br>
+ need to edit the Strings at the top of the file search.jsp to appropriate<br>
+ ones for your system.</p><br>
+< p>If there are no entries with the same last name that you type in, the
+program<br>
+ will add 3 so you will get some output: &quot;Aaron, Bob, and Calvin&quot;.</p><br>
+< p>&nbsp;</p><br>
+< form name="form1" method="post" action="search.jsp"><br>
+< p align="center"><br>
+ Type a Last Name to search for here:<br>
+<input name="name" type="text" id="name"><br>
+ then click &quot;Submit&quot;.</p><br>
+< p align="center"> <input type="submit" name="Submit" value="Submit"><br>
+< /p><br>
+< /form><br>
+< p>&nbsp;</p><br>
+< /body><br>
+< /html></p>
+ <p> </p>
+ <p><font size="+1">Put this in CATALINA_HOME/webapps/dbTest/WEB-INF/web.xml:</font></p>
+ <p><?xml version="1.0" encoding="UTF-8"?></p>
+ <p><!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application
+ 2.2//EN' 'http://java.sun.com/j2ee/dtds/web-app_2.2.dtd'></p>
+ <p><web-app><br>
+<session-config><br>
+<session-timeout><br>
+ 30<br>
+</session-timeout><br>
+</session-config><br>
+<welcome-file-list><br>
+<welcome-file>index.htm</welcome-file><br>
+</welcome-file-list><br>
+<resource-ref><br>
+<description>Test SQL DB Connection</description><br>
+<res-ref-name>jdbc/dbTest</res-ref-name><br>
+<res-type>javax.sql.DataSource</res-type><br>
+<res-auth>Container</res-auth><br>
+</resource-ref><br>
+<
+ /web-app><br>
+ </p>
+ <p><font size="+1">Put this in CATALINA_HOME/webapps/dbTest/search.jsp:</font><br>
+ </p>
+ <p><%@page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*,javax.sql.*,javax.servlet.*,
+ javax.servlet.http.*,javax.naming.*,org.firebirdsql.management.*"%></p>
+ <p><html><br>
+ <
+ head><br>
+ <
+ title>search.jsp</title><br>
+ <
+ meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><br>
+ <
+ /head></p>
+ <p><body bgcolor="#CCCCFF" text="#000000"><p><br>
+ <
+ /p><br>
+ <
+ H1 align="center">Test Search</H1></p>
+ <p><%<br>
+ // Edit the strings below as needed for your system.</p>
+ <p>String DB_SERVER_URL = "localhost";<br>
+ int DB_SERVER_PORT = 3050;</p>
+ <p>// Use forward slashes here, even on Windows systems.<br>
+ String DB_PATH = "c:/databases";</p>
+ <p>String DB_NAME = "test.gdb";<br>
+ String DB_USER = "sysdba";<br>
+ String DB_PASSWORD = "masterkey";<br>
+ String DB_CONNECTION_STRING = "jdbc:firebirdsql:"+DB_SERVER_URL+"/"+DB_SERVER_PORT+":"+DB_PATH+"/"+DB_NAME;</p>
+ <p>String lastName = request.getParameter("name");</p>
+ <p>// To help you debug, you can set a session attribute to values indicating<br>
+ // the prograss through the web app, then use an HTTP monitor to see how
+ far <br>
+ // you have progressed.</p>
+ <p>// This stuff creates the database with the JMX management tools <br>
+ // if it doesn't already exist.<br>
+ FBManager fbManager = new FBManager();</p>
+ <p>fbManager.setServer(DB_SERVER_URL);<br>
+ fbManager.setPort(DB_SERVER_PORT);</p>
+ <p>fbManager.start();</p>
+ <p>fbManager.createDatabase(DB_PATH + "/" + DB_NAME, DB_USER, DB_PASSWORD);</p>
+ <p>%><br>
+ Opening a connection with connection string: <%=DB_CONNECTION_STRING%><BR><BR><br>
+ <
+ %</p>
+ <p>// Get a connection to the database from the dataSource.<br>
+ DataSource ds=null;<br>
+ Connection connRSFind=null;</p>
+ <p>try<br>
+ {<br>
+ Context ctx = new InitialContext();</p>
+ <p> if(ctx == null ) <br>
+ throw new Exception("Boom - No Context");</p>
+ <p> ds = (DataSource)ctx.lookup("java:comp/env/jdbc/dbTest");</p>
+ <p> try<br>
+ {<br>
+ connRSFind = ds.getConnection();<br>
+ }<br>
+ catch (SQLException e)<br>
+ {<br>
+ System.out.println("getting new data source connection failed! Error: "+e+"\n");<br>
+ }</p>
+ <p> }<br>
+ catch (Exception e)<br>
+ {<br>
+ System.out.println("Could Not get data source, error: "+e+"\n");<br>
+ }</p>
+ <p>// Back to HTML, show the user the LAST_NAME typed in.<br>
+ %><br>
+ <
+ p><br>
+ The user entered name is: <%=lastName%><br>
+ <
+ p><br>
+ <
+ %</p>
+ <p>String sqlString = "SELECT * FROM CUSTOMERS WHERE LAST_NAME = \'" +
+ lastName +"\'";</p>
+ <p>// Switch back to html so we can print out the sqlString on the web page.<br>
+ %></p>
+ <p>The SQL String is: <%=sqlString%><p></p>
+ <p><%<br>
+ PreparedStatement StatementRSFind=null;<br>
+ ResultSet RSFind=null;<br>
+ boolean resultException=false;<br>
+ boolean rsReady = false;</p>
+ <p>try<br>
+ {<br>
+ StatementRSFind = connRSFind.prepareStatement(sqlString);</p>
+ <p> RSFind = StatementRSFind.executeQuery();<br>
+ rsReady = RSFind.next();<br>
+ }<br>
+ catch(SQLException e1)<br>
+ {<br>
+ e1.printStackTrace(System.out);<br>
+ resultException = true; // Set a flag so that we know there was an error, not
+ just an empty result set.</p>
+ <p>%><br>
+ Could not find table, I'll try to add it: <%=e1.getMessage()%><BR><br>
+ <
+ %<br>
+ }</p>
+ <p>if (!rsReady || resultException)<br>
+ { // If there are no database entries with this last name, enter a few so the
+ user has something to look at.<br>
+ // Or, if there was an error, the table probably doesn't exist yet.</p>
+ <p> // try to create table CUSTOMERS, in case it doesn't exist yet.</p>
+ <p> if (resultException)<br>
+ {// The table CUSTOMERS probably doesn't exist, so we create it here.<br>
+ Statement statement2=null;</p>
+ <p> try<br>
+ {<br>
+ statement2 = connRSFind.createStatement();<br>
+ }<br>
+ catch(SQLException e2)<br>
+ {<br>
+ %><br>
+ Could not create statement2 with this connection! Check your database settings
+ in search.jsp: <%=e2.getMessage()%><BR><br>
+<
+ %<br>
+ }</p>
+ <p> if (statement2 != null)<br>
+ {<br>
+ try<br>
+ { // try to crate the table CUSTOMERS.<br>
+ sqlString = "CREATE TABLE CUSTOMERS(LAST_NAME VARCHAR(50), FIRST_NAME
+ VARCHAR(50))";<br>
+ statement2.execute(sqlString);<br>
+ statement2.close();<br>
+ }<br>
+ catch(SQLException e2a)<br>
+ {<br>
+ %><br>
+ Table CUSTOMERS already exists and we tried to create it again, or it could
+ not be created: <%=e2a.getMessage()%> <BR><br>
+<
+ %<br>
+ }<br>
+ }<br>
+ } // Table CUSTOZMERS should exist now, if it didn't before or things are really
+ messed up.<br>
+ else<br>
+ {<br>
+ %><br>
+ First attempt at getting a result set produced an empty result set.<BR><br>
+<
+ %<br>
+ }</p>
+ <p> // Insert some names into table CUSTOMERS. Either the table is new and
+ empty, or there were<br>
+ // no entries with the last name the user gave us, so we'll enter a few, so
+ the user has<br>
+ // something to look at.<br>
+ Statement statement3=null;</p>
+ <p> try<br>
+ {<br>
+ statement3 = connRSFind.createStatement();<br>
+ }<br>
+ catch(SQLException e3)<br>
+ {<br>
+ %><br>
+ Could not create statement3 with this connection! Check your database settings
+ in search.jsp: <%=e3.getMessage()%><BR><br>
+<
+ %<br>
+ }</p>
+ <p> if (statement3 != null)<br>
+ {<br>
+ try<br>
+ {<br>
+ sqlString = "INSERT INTO CUSTOMERS(LAST_NAME, FIRST_NAME) VALUES(\'"+lastName+"\',
+ 'Aaron')";<br>
+ %><br>
+ Executing SQL: <%=sqlString%><BR><br>
+<
+ %<br>
+ statement3.execute(sqlString);<br>
+ sqlString = "INSERT INTO CUSTOMERS(LAST_NAME, FIRST_NAME) VALUES(\'"+lastName+"\',
+ 'Bob')";<br>
+ %><br>
+ Executing SQL: <%=sqlString%><BR><br>
+<
+ %<br>
+ statement3.execute(sqlString);<br>
+ sqlString = "INSERT INTO CUSTOMERS(LAST_NAME, FIRST_NAME) VALUES(\'"+lastName+"\',
+ 'Calvin')";<br>
+ %><br>
+ Executing SQL: <%=sqlString%><BR><BR><br>
+<
+ %<br>
+ statement3.execute(sqlString);<br>
+ statement3.close();<br>
+ }<br>
+ catch(SQLException e3a)<br>
+ {<br>
+ %><br>
+ We could not enter data in table CUSTOMERS for some reason: <%=e3a.getMessage()%> <BR><br>
+<
+ %<br>
+ }<br>
+ }<br>
+ </p>
+ <p> // try again to get a result set.<br>
+ sqlString = "SELECT * FROM CUSTOMERS WHERE LAST_NAME = \'" + lastName
+ +"\'"; <br>
+ StatementRSFind = connRSFind.prepareStatement(sqlString);<br>
+ RSFind = StatementRSFind.executeQuery();<br>
+ rsReady = RSFind.next();<br>
+ }</p>
+ <p>int i = 0;</p>
+ <p>if (rsReady)<br>
+ {<br>
+ boolean done=false;<br>
+ while (!done)<br>
+ {<br>
+ i++;<br>
+ String RSFind_Last = (String) RSFind.getObject("LAST_NAME");<br>
+ String RSFind_First = (String) RSFind.getObject("FIRST_NAME");<br>
+ // display the names in the browser.<br>
+ %><br>
+ Name <%=i%>: <%=RSFind_First%> <%=RSFind_Last%> <BR><br>
+<
+ %<br>
+ done = !RSFind.next();<br>
+ } //End while loop</p>
+ <p> RSFind.close();<br>
+ }<br>
+ else<br>
+ {<br>
+ %><br>
+<
+ BR>The result set was empty. Check to be sure database is running and settings
+ in search.jsp are correct.<BR><br>
+<
+ %</p>
+ <p> }<br>
+ if (StatementRSFind != null)<br>
+ StatementRSFind.close();</p>
+ <p>if (connRSFind != null)<br>
+ connRSFind.close();</p>
+ <p>%></p>
+ <p></body><br>
+ <
+ /html></p>
+ <p><br>
+ </p>
+ <p><font size="+1">Put this in CATALINA_HOME/conf/server.xml before </Host>:</font> </p>
+ <P><Context path="/dbTest" docBase="dbTest"<br>
+debug="0" reloadable="true" crossContext="true"></P>
+ <p> <Logger className="org.apache.catalina.logger.FileLogger"<br>
+ prefix="localhost_dbTest_log." suffix=".txt"<br>
+ timestamp="true"/></p>
+ <p> <Resource name="jdbc/dbTest"<br>
+ auth="Container"<br>
+ type="javax.sql.DataSource"/></p>
+ <p> <ResourceParams name="jdbc/dbTest"></p>
+ <p> <parameter><br>
+<name>factory</name><br>
+<value>org.apache.commons.dbcp.BasicDataSourceFactory</value><br>
+</parameter></p>
+ <p> <parameter><br>
+<name>removeAbandoned</name><br>
+<value>true</value><br>
+</parameter></p>
+ <p> <parameter><br>
+<name>removeAbandonedTimeout</name><br>
+<value>300</value><br>
+</parameter></p>
+ <p> <parameter><br>
+<name>logAbandoned</name><br>
+<value>true</value><br>
+</parameter></p>
+ <p> <!-- Maximum number of dB connections in pool. Make sure you<br>
+ configure your Firebird max_connections large enough to handle<br>
+ all of your db connections. Set to 0 for no limit.<br>
+ --><br>
+<parameter><br>
+<name>maxActive</name><br>
+<value>100</value><br>
+</parameter></p>
+ <p> <!-- Maximum number of idle dB connections to retain in pool.<br>
+ Set to 0 for no limit.<br>
+ --><br>
+<parameter><br>
+<name>maxIdle</name><br>
+<value>30</value><br>
+</parameter></p>
+ <p> <!-- Maximum time to wait for a dB connection to become available<br>
+ in ms, in this example 10 seconds. An Exception is thrown if<br>
+ this timeout is exceeded. Set to -1 to wait indefinitely.<br>
+ --><br>
+<parameter><br>
+<name>maxWait</name><br>
+<value>10000</value><br>
+</parameter></p>
+ <p> <!-- Firebird dB username and password for dB connections --><br>
+<parameter><br>
+<name>username</name><br>
+<value>SYSDBA</value><br>
+</parameter><br>
+<parameter><br>
+<name>password</name><br>
+<value>masterkey</value><br>
+</parameter></p>
+ <p> <!-- Class name for JayBird JDBC driver --><br>
+<parameter><br>
+<name>driverClassName</name><br>
+<value>org.firebirdsql.jdbc.FBDriver</value><br>
+</parameter></p>
+ <p> <!-- The JDBC connection url for connecting to your MySQL dB.<br>
+ The autoReconnect=true argument to the url makes sure that the<br>
+ mm.mysql JDBC Driver will automatically reconnect if mysqld closed the<br>
+ connection. mysqld by default closes idle connections after 8 hours.<br>
+ --><br>
+<parameter><br>
+<name>url</name><br>
+<value>jdbc:firebirdsql:localhost/3050:/databases/test.gdb</value><br>
+</parameter><br>
+</ResourceParams></p>
+ <p></Context><br>
+ </p>
<P><BR>
</P>
<hr>
@@ -1079,7 +1833,7 @@
code to the daily build for that day.<br>
</p>
<P><BR>
- </P>
+</P>
<hr>
<P><BR>
</P>
@@ -1248,6 +2002,7 @@
file?</font></p>
<p align=CENTER><a href="#top">return to top</a></p>
<P> </P>
+<P>JayBird is now available as a single jar file: firebirdsql-full.jar.</P>
<P>Some of the code was originally from Sun and they didn't allow distribution
by third parties without a license. To be scrupulously legal you had to download
the Sun jars separately. This was a pain so equivalent classes from the JBoss
@@ -1634,15 +2389,39 @@
kind of security?</font></p>
<p align=center><a href="#top">return to top</a></p>
<p align=left> </p>
-<p>No. Firebird and InterBase do not currently support secure connections internally.
- Therefore JayBird cannot. You must use SSL with an application server, or an
+<p>Not directly. Firebird and InterBase do not currently support secure connections
+ internally. Therefore JayBird cannot. You must use SSL with an application
+ server, or
+ an
IP tunneling program to secure your data in transit. These are both readily
- available. Secure connections are possible, you just have to use external software
+ available. Secure connections are possible, you just have to use external
+ software
to get them.</p>
+<p>One popular tunneling program is ZeBeDee. See<a href="http://www.ibphoenix.com/a471.htm"> http://www.ibphoenix.com/a471.htm</a> for
+ more information and examples of a secure Firebird setup.</p>
<p>There is a widely held misconception that Interclient/Interserver provide a
secure connection. All they do is encode the password used to log in to the
database. Data transactions after that are insecure unless the above means are
used to secure them.</p>
+<p>Another method of securing your data is to write your application as a web
+ application that runs on an application server and displays in a browser. Most
+ app servers have secure access capability. In that scenario Firebird and the
+ app server are run
+ on systems
+ behind
+ a firewall.
+ The web
+ browser makes secure calls to the app server. The app server then makes
+ unsecure calls to the Firebird server using Jaybird. Since both the app server
+ and the firebird server are behind the firewall, none of their transactions
+ are visible to the outside world. Port 3050 should be blocked at the firewall
+ in such a scenario to prevent unauthorized access or spoofing of Firebird.</p>
+<p>This scenario will not prevent snooping from other systems behind your firewall,
+ so for best security you may want to put your servers behind their own firewall.</p>
+<p>If the application server and the Firebird server are on the same machine,
+ packets never reach the network, so snooping is more difficult. Port 3050 will
+ have
+ to remain available, however, so the system will not be completely secure.</p>
<hr>
<p align=left> </p>
<p align=center><font size="+2"><a name="29"></a>29- Does JayBird support dialect
@@ -1836,6 +2615,22 @@
How do I use stored procedures with JayBird?</font></p>
<p align=center><a href="#top">return to top</a></p>
<p align=left> </p>
+<p align=left>Jaybird does not fully support escaped syntax for procedure calls
+ (output parameters are not supported). However if you use native Firebird syntax,
+ stored
+procedures are fully supported. </p>
+<p>Native Firebird syntax:</p>
+<p>EXECUTE PROCEDURE proc_name(?, ?, ?, ...) for executable procedures;<br>
+ SELECT * FROM proc_name(?, ?, ...) for selectable procedures.</p>
+<p>{call proc_name(?, ?, ...)} is translated into EXECUTE PROCEDURE<br>
+ proc_name(?, ?, ?, ...) without any analysis. This means that:</p>
+<p>a) It is not usable for selectable stored procedures;<br>
+ b) Positions of output params are independent of input params (in JDBC they're
+ not) and start with 1.</p>
+<p>When you use native syntax, stored procedures can be called both from PreparedStatement
+ and from CallableStatement, in case of escaped syntax - only from CallableStatement.<br>
+</p>
+<p><font size="+1">Examples</font> </p>
<p align=left>The following example is a stripped-down version of code taken from
the project source code tests in the directory:</p>
<p align=left>client-java/src/test/org/firebirdsql/jdbc/TestFBCallableStatement.java
@@ -1925,17 +2720,44 @@
sends them correctly. </p>
<p> From one of the posts in the Firebird devel list this issue seems to appear
when using the gds32.dll under Windows but not with the INET protocol.</p>
-<p> </p>
+<hr>
+<p></p>
+<p align=center><font size="+2"><a name="41" id="41"></a>41- Can
+I use CachedRowSet with JayBird?</font></p>
+<p align=center><a href="#top">return to top</a></p>
<p></p>
+<p>Yes, but third party code must be used. CachedRowSet allows you to store
+ a copy of a rowSet and disconnect from the Firebird server for processing.
+ This is useful because it allows you to release a connection immediately after
+ getting a rowSet instead of holding it open while the rowSet is processed.
+ That allows the server to run more efficiently</p>
+<p>Two third-party implementations have
+ been tested and seem to work the same. </p>
+<p>One is from Oracle: OracleCachedRowSet
+ -- it doesn't require an Oracle database but does require the Oracle JDBC
+jar file. You need both ocrs12.zip and ojdbc14.jar.</p>
+<p>See: <a href="http://otn.oracle.com/software/tech/java/sqlj_jdbc/content.htm">http://otn.oracle.com/software/tech/java/sqlj_jdbc/content.htm</a>l </p>
+<p> </p>
+<p>Another is an open source project called jxutil: XDisconnectedRowSet -- only
+requires one jar file, jxRowSet-0.8a.jar.</p>
+<p>See:<a href="http://sourceforge.net/projects/jxutil/"> http://sourceforge.net/projects/jxutil/</a></p>
+<p>Depending on the intended use, it would be appropriate to study the licenses
+ both implementations come under.<br>
+ Jxutil is LGPL (Limited Gnu Public License) software, while OracleCachedRowSet
+ uses the Oracle Technology Network Development and Distribution License. See: <a href="http://otn.oracle.com/software/htdocs/distlic.html">http://otn.oracle.com/software/htdocs/distlic.html</a>.<br>
+ <br>
+</p>
<hr>
<p></p>
-<p align=center><font size="+2"><a name="dpb"></a>41- How do I pass Database Parameter
- Buffer (DPB) parameters?</font></p>
+<p align=center><font size="+2"><a name="dpb"></a>42- How do I pass Database
+ Parameter Buffer (DPB) parameters?</font></p>
<p align=center><a href="#top">return to top</a></p>
<p align=center> </p>
-<p align=left>You can pass any DPB parameter by stripping the "isc_dpb_"
- from the DPB parameter name and putting it in the URL. In case of roles and
- character encoding this could be:</p>
+<p align=left> If you use FBWrappingDataSource, you specify DPB parameters in
+ FBConnectionRequestInfo.</p>
+<p align=left>If you are using java.sql.DriverManager you can pass any DPB parameter
+ by stripping the "isc_dpb_" from the DPB parameter name and putting
+ it in the URL. In case of roles and character encoding this could be:</p>
<p>...my.gdb?sql_role_name=guest&lc_ctype=WIN1251</p>
<p>See the InterBase API Guide Chapter 4, "Working with Databases" for
more details. The following table is a listing of DPB parameters.</p>
@@ -2100,7 +2922,7 @@
<hr>
<p><br>
</p>
-<p align=CENTER><font size=5><a name="codeexamples"></a>42- Can you give me some
+<p align=CENTER><font size=5><a name="codeexamples"></a>43- Can you give me some
code examples?</font></p>
<p align=CENTER><a href="#top">return to top</a></p>
<p align=CENTER><br>
@@ -2798,7 +3620,7 @@
</p>
<p><font face="Courier, monospace">import org.firebirdsql.jdbc.FBWrappingDataSource;</font></p>
<p><font face="Courier, monospace">import org.firebirdsql.jca.FBConnectionRequestInfo;</font></p>
-<p><font face="Courier, monospace">import org.firebirdsql.gds.GDS;</font></p>
+<p><font face="Courier, monospace">import org.firebirdsql.gds.ISCConstants;</font></p>
<p><br>
<br>
</p>
@@ -2813,7 +3635,7 @@
<br>
</p>
<p><font face="Courier, monospace">// Set the standard properties</font></p>
-<p><font face="Courier, monospace">dataSource.setDatabaseName ("localhost/3050:c:/database/employee.gdb");</font></p>
+<p><font face="Courier, monospace">dataSource.setDatabase ("localhost/3050:c:/database/employee.gdb");</font></p>
<p><font face="Courier, monospace">dataSource.setDescription ("An example
database of employees");</font></p>
<p><br>
@@ -2839,9 +3661,11 @@
<p><font face="Courier, monospace">* DPB that will be used for this data source.</font></p>
<p><font face="Courier, monospace">*/</font></p>
<p><font face="Courier, monospace">FBConnectionRequestInfo cri = dataSource.getConnectionRequestInfo();</font></p>
-<p><font face="Courier, monospace">cri.setProperty(GDS.isc_dpb_lc_ctype, "NONE");</font></p>
-<p><font face="Courier, monospace">cri.setProperty(GDS.isc_dpb_num_buffers, 1);</font></p>
-<p><font face="Courier, monospace">cri.setProperty(GDS.isc_dpb_sql_dialect, 3);</font></p>
+<p><font face="Courier, monospace">cri.setProperty(ISCConstants.isc_dpb_lc_ctype, "NONE");</font></p>
+<p><font face="Courier, monospace">cri.setProperty(ISCConstants.isc_dpb_num_buffers,
+1);</font></p>
+<p><font face="Courier, monospace">cri.setProperty(ISCConstants.isc_dpb_sql_dialect,
+3);</font></p>
<p><font face="Courier, monospace">dataSource.setConnectionRequestInfo(cri);</font></p>
<p><br>
<br>
|