Subject | Re: [Firebird-Java] DataSource character set |
---|---|
Author | Rick Fincher |
Post date | 2003-11-24T23:05:12Z |
Hi Mats,
If you are using DBCP under Tomcat for your connection pooling you can use
connectionProperties to pass parameters to the driver at startup. User and
Password properties are done automatically, but others must be listed.
This goes in the <ResourceParams> section of the DataSource parameters in
CATALINA_HOME/conf/server.xml
An example is:
<parameter>
<name>connectionProperties</name>
<value>"lc_ctype=WIN1251"</value>
</parameter>
You can check the following link for more details:
http://jakarta.apache.org/commons/dbcp/configuration.html
You can also turn on log4j logging for JayBird under Tomcat to see what is
going on. That is another bucket of worms, however.
Hope this helps!
Rick
If you are using DBCP under Tomcat for your connection pooling you can use
connectionProperties to pass parameters to the driver at startup. User and
Password properties are done automatically, but others must be listed.
This goes in the <ResourceParams> section of the DataSource parameters in
CATALINA_HOME/conf/server.xml
An example is:
<parameter>
<name>connectionProperties</name>
<value>"lc_ctype=WIN1251"</value>
</parameter>
You can check the following link for more details:
http://jakarta.apache.org/commons/dbcp/configuration.html
You can also turn on log4j logging for JayBird under Tomcat to see what is
going on. That is another bucket of worms, however.
Hope this helps!
Rick
----- Original Message -----
> I'm using Tomcat 5.0, Java 1.4 and Interbase 6.0
>
>
>
>
> My problem is that I would like to use the connection pooling and
> need
> to use javax.sql.DataSource. If I use a Driver.connection I can set
> the character set in a Properties unit. My database uses win1252
> encoding and I need to open a connection using the same encoding
> othervise I can't INSERT any data.
>
>
>
>
> How can I open a connection using the DataSource JDBC method AND
> supply the correct character set?? I have been struggling with this
> problem now for 3 days and learned a lot in the process but this
> still
> is a mystery.
>
>
>
>
> ANY help would be appreciated.
>
>
>
>
> Mats