Skip to Content.
Sympa Menu

freetds - Re: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Зверев Виталий Борисович <VZverev AT genesis.spb.ru>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC
  • Date: Tue, 8 Nov 2005 18:57:54 +0300

Frediano,
may be you are right about MS jdbc deviation, plus Squirrel uses wrong
pattern for try-except block in setCatalog.
As result, setCatalog in Squirrel-JdbcOdbcBridge-FreeTds chain does not work
properly.
Any way, thanks for help.

Sincerely yours.
-------------------------------------------------------
Vitaly Zverev, OCP DBA 8&8i
Oracle E-Business Suite &
Infiniband Linux Cluster Administrator
Genesis Ltd., St.Petersburg, Russia



> -----Original Message-----
> From: freetds-bounces AT lists.ibiblio.org
> [mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of
> ZIGLIO, Frediano, VF-IT
> Sent: Tuesday, November 08, 2005 6:00 PM
> To: FreeTDS Development Group
> Subject: Re: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC
>
> Well, just to define my point of view
> SQLSetConnectAttr(SQL_ATTR_CURRENT_CATALOG) require just the
> name of catalog so it's wrong to unquote catalog name. It
> seems that sql server jdbc driver from Microsoft use a quoted
> version for setCatalog however this is jdbc not odbc.
>
> freddy77
>
> > -----Original Message-----
> > From: freetds-bounces AT lists.ibiblio.org
> > [mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of
> > VZverev AT genesis.spb.ru
> > Sent: martedì 8 novembre 2005 15.15
> > To: FreeTDS Development Group
> > Subject: Re: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC
> >
> > Perhaps Colin Bell has another opinions as author of
> > SQLConnection.java
> >
> > Sincerely yours.
> > -------------------------------------------------------
> > Vitaly Zverev, OCP DBA 8&8i
> > Oracle E-Business Suite &
> > Infiniband Linux Cluster Administrator Genesis Ltd., St.Petersburg,
> > Russia
> >
> >
> >
> > > -----Original Message-----
> > > From: freetds-bounces AT lists.ibiblio.org
> > > [mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of ZIGLIO,
> > > Frediano, VF-IT
> > > Sent: Tuesday, November 08, 2005 5:01 PM
> > > To: FreeTDS Development Group
> > > Subject: Re: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC
> > >
> > > >
> > > > 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
> > > _______________________________________________
> > > FreeTDS mailing list
> > > FreeTDS AT lists.ibiblio.org
> > > http://lists.ibiblio.org/mailman/listinfo/freetds
> > >
> > >
> > _______________________________________________
> > FreeTDS mailing list
> > FreeTDS AT lists.ibiblio.org
> > http://lists.ibiblio.org/mailman/listinfo/freetds
> >
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>



Archive powered by MHonArc 2.6.24.

Top of Page