freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC
- 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: Fri, 4 Nov 2005 18:26:46 +0300
No, if you mean "odbc.c,v 1.395 2005/11/02 12:57:54 freddy77" from CVS,
it does not solve JdbcOdbc bridging problems with
DatabaseMetaData.getSchemas(),DatabaseMetaData.getCatalogs() and so on.
Squirell 2.0 is perfect example of their reproducing.
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: Friday, November 04, 2005 4:47 PM
> To: FreeTDS Development Group
> Subject: Re: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC
>
> >
> > Thanks for clarification, Frediano.
> > if we wish to achieve 100% mimic for
> > DatabaseMetaData.getSchemas() and
> > DatabaseMetaData.getCatalogs() in jdbc-odbc bridging we
> should'n use
> > sp_tableswc. I understand this method looks more systematic, but
> > actually JdbcOdbc bridge call:
> > 1) for getCatalogs()
> > - original SQLSRV32.DLL::SQLTablesW call "sp_tables N'',
> N'', N'%',
> > NULL",
> > IAW "sp_tables @table_name = N'', @table_owner = N'',
> > @table_qualifier = N'%' , @table_type = null", but sp_tableswc does
> > not return thees rows.
> >
> > we could see it in jdbcdebug.log by Squirrel
> > ....
> > *DatabaseMetaData.getCatalogs
> > *DatabaseMetaData.getTables (%,,,null)
> > Allocating Statement Handle (SQLAllocStmt), hDbc=57676616
> > hStmt=57681616
> > Tables (SQLTables), hStmt=57681616,catalog=%, schema=, table=,
> > types=null
> > Number of result columns (SQLNumResultCols), hStmt=57681616
> > value=5
> > *ResultSet.getMetaData
> > Fetching (SQLFetch), hStmt=57681616
> > *ResultSetMetaData.getColumnType (1)
> > Column attributes (SQLColAttributes), hStmt=57681616,
> icol=1, type=2
> > value (int)=-9
> > Column attributes (SQLColAttributes), hStmt=57681616,
> icol=1, type=3
> > value (int)=256
> > Get string data (SQLGetData), hStmt=57681616, column=1,
> > maxLen=257
> > admin
> > Fetching (SQLFetch), hStmt=57681616
> > *ResultSetMetaData.getColumnType (1)
> > Get string data (SQLGetData), hStmt=57681616, column=1,
> > maxLen=257
> > Aida32
> > ....
> > So, getTables (%,,,null) was transformed into sp_tables '',
> '', '%',
> > NULL
> >
> > 2) for getSchemas()
> > original SQLSRV32.DLL::SQLTablesW call "sp_tables N'', N'%', N'',
> > NULL".
> > "sp_tableswc N'', N'%', N'', NULL" does not return rows
> like sp_tables
> >
> > *DatabaseMetaData.getSchemas
> > *DatabaseMetaData.getTables (,%,,null)
> > Allocating Statement Handle (SQLAllocStmt), hDbc=57676616
> > hStmt=57681616
> > Tables (SQLTables), hStmt=57681616,catalog=, schema=%, table=,
> > types=null
> > Number of result columns (SQLNumResultCols), hStmt=57681616
> > value=5
> > *ResultSet.getMetaData
> > Fetching (SQLFetch), hStmt=57681616
> > *ResultSetMetaData.getColumnType (1)
> > Column attributes (SQLColAttributes), hStmt=57681616,
> icol=1, type=2
> > value (int)=-9
> > Column attributes (SQLColAttributes), hStmt=57681616,
> icol=2, type=2
> > value (int)=-9
> > Column attributes (SQLColAttributes), hStmt=57681616,
> icol=2, type=3
> > value (int)=256
> > Get string data (SQLGetData), hStmt=57681616, column=2,
> > maxLen=257
> > dbo
> > Fetching (SQLFetch), hStmt=57681616
> >
> > sp_tableswc could mimic *structure* of sp_tables resultset,
> but power
> > of the set will be different.
> > In accordance with it we have many identical records on the
> Squirrel's
> > tab 'Schemas'
> >
> > Another problem - we should mimic 'Connection is busy with
> results for
> > another hstmt'
> > .....
> > Tables (SQLTables), hStmt=57681616,catalog=%, schema=, table=,
> > types=null RETCODE = -1 ERROR - Generating SQLException...
> > SQLException: SQLState(S1000) vendor code(0)
> > java.sql.SQLException: [Microsoft][ODBC SQL Server
> Driver]Connection
> > is busy with results for another hstmt .....
> > And next (may be it is Squirrel's bug)
> odbc.c:change_database called
> > by JdbcOdbc bridge with quoted identifiers ("master"
> > instead of master) and as result - USE ["master"] call failed.
> >
> > I'm a bit busy now, may be take a look at this later
> >
> > Sincerely yours.
> > -------------------------------------------------------
> > Vitaly Zverev, OCP DBA 8&8i
> > Oracle E-Business Suite &
> > Infiniband Linux Cluster Administrator Genesis Ltd., St.Petersburg,
> > Russia
> >
>
> I think I fixed your problem in CVS HEAD. There are some
> strange values that cause strange behavior calling SQLTables.
> I also improve test to catch what you require.
>
> freddy77
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>
-
Re: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC,
Зверев Виталий Борисович, 11/01/2005
- <Possible follow-up(s)>
-
Re: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC,
Pickett, David, 11/01/2005
- Re: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC, Frediano Ziglio, 11/01/2005
- Re: [freetds] Squirrel JDBC-ODBC Bridge and freeTDS ODBC, Зверев Виталий Борисович, 11/01/2005
- 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.