freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC
- From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
- To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC
- Date: Tue, 8 Nov 2005 15:00:48 +0100
>
> Ok, Frediano, as you wish.
> Squirrel has SQLConnection.java module (a nise setCatalog
> wrapper), which could outperform my workaround:
> public void setCatalog(String catalogName)
> throws SQLException
> {
> validateConnection();
> final Connection conn = getConnection();
> final String oldValue = conn.getCatalog();
> if (!StringUtilities.areStringsEqual(oldValue,
> catalogName))
> {
> try
> {
> conn.setCatalog(catalogName);
> }
> catch (SQLException ex)
> {
> // MS SQL Server throws an
> exception if the catalog name
> // contains a period without it
> being quoted.
>
> conn.setCatalog(quote(catalogName));
> <-------------------- gotcha!
> }
>
> getPropertyChangeReporter().firePropertyChange(IPropertyNames.CATALOG,
>
> oldValue, catalogName);
> }
> }
>
> perhaps it should looks like:
>
> if (!ex.getSQLState().equalsIgnoreCase("01000"))
> conn.setCatalog(quote(catalogName));
> else throw ex;
>
> Sincerely yours.
> -------------------------------------------------------
> Vitaly Zverev, OCP DBA 8&8i
> Oracle E-Business Suite &
> Infiniband Linux Cluster Administrator
> Genesis Ltd., St.Petersburg, Russia
>
Instead of ignoring 01000 warning you could test if getCatalog return
wanted catalog name.
freddy77
-
Re: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC
, (continued)
- Re: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC, Pickett, David, 11/01/2005
- Re: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC, ZIGLIO, Frediano, VF-IT, 11/02/2005
- Re: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC, Зверев Виталий Борисович, 11/03/2005
- Re: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC, ZIGLIO, Frediano, VF-IT, 11/04/2005
-
Re: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC,
Зверев Виталий Борисович, 11/04/2005
- Re: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC, Frediano Ziglio, 11/05/2005
- Re: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC, Frediano Ziglio, 11/05/2005
- Re: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC, Зверев Виталий Борисович, 11/07/2005
- Re: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC, ZIGLIO, Frediano, VF-IT, 11/08/2005
- Re: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC, Зверев Виталий Борисович, 11/08/2005
- Re: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC, ZIGLIO, Frediano, VF-IT, 11/08/2005
- Re: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC, Зверев Виталий Борисович, 11/08/2005
- Re: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC, ZIGLIO, Frediano, VF-IT, 11/08/2005
- Re: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC, Зверев Виталий Борисович, 11/08/2005
Archive powered by MHonArc 2.6.24.