Skip to Content.
Sympa Menu

freetds - RE: [freetds] sp_tables (ODBC)

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO Frediano" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] sp_tables (ODBC)
  • Date: Thu, 6 Nov 2003 11:31:16 +0100

>
> Hello all,
>
>
> Far from being expert in ODBC, I managed to use unixODBC in
> conjunction with FreeTDS on RedHat 7.3. tsql works great,
> isql works great and I can tap into my data sources.
>
>
> Now the purpose of all this is to get Lotus Domino running on
> that box to tap into MS SQL server data sources.
>
> Up to freetds-0.61, Domino was crashing when trying to access
> the datasource for some reason. In 0.61 the Domino ODBC test
> could not report on freetds-odbc drivers details (returning
> "Operation not supported"), now the latest nightly build does
> work and reports all required Domino driver details. Now
> Domino does not crash anymore!!! Thanks for making that work!
> Am I right to say that freetds-unixodbc wasn;t completely
> unixODBC compliant???
>
>
> In Lotus Notes Designer, you can set up ODBC data sources and
> get it to point to a unixODBC datasource on the system the
> Domino Server runs on. Once you have done that you can click
> on a button to browser metatadata (Tables of a database) It
> works great with unixODBC / MyODBC (MySQL ODBC driver) - I
> can see and pick tables from a database. But when I use a
> FreeTDS unixODBC datasource it does not work (Domino says
> can't find any Metadata)
>
> After a bit of investigation and analysing the loigs I
> notices that the following strored procedure was called by my
> "Browse Metedata" button
> click:
>
> sp_tables @table_type='TABLE'
>
> Ran this from isql and no row came back
>
> I went in the SQL query analyser on the MS SQL server I'm
> trying to reach throuch unixODBX and ran it: no row came back.
>
> Looked at the MS Sql books online to fine out that the
> correct syntax shoould be:
>
> sp_tables @table_type="'TABLE'"
>
> Rand that from isql and all tables come back.
>
>
> So my question is:
>
>
> Is there a way to make freetds-unixodbc run that sp_table
> query by enclosing the @table_type value in double quotes. Or
> is it domino that should know it talks to a MSSQL server and
> should add these double-quotes before calling unixODBC API?
> Or is it unixODBC API which should add those double quotes???
>
>
> Any thoughts anyone?
>
> Thanks for your help!
>
> Patrick
>

This patch should solve your problem. ODBC support quoted/unquoted types
while sp_tables support only quoted one...

freddy77

Attachment: vedi.diff.gz
Description: vedi.diff.gz




Archive powered by MHonArc 2.6.24.

Top of Page