Skip to Content.
Sympa Menu

freetds - Re: [freetds] FreeTDS does not work with Sybase SQL Anywhere 10, 11 or 12 -- sp_datatype_info()

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Tony Esposito <Tony.Esposito AT region10.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] FreeTDS does not work with Sybase SQL Anywhere 10, 11 or 12 -- sp_datatype_info()
  • Date: Wed, 6 Feb 2013 21:16:41 +0000

I'd be more than happy to help us all out and to contribute toward this
worthy project. No insult intended by my remarks previous about 'limitation
to product'. :-)

-----Original Message-----
From: freetds-bounces AT lists.ibiblio.org
[mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of James K. Lowden
Sent: Wednesday, February 06, 2013 3:12 PM
To: freetds AT lists.ibiblio.org
Subject: Re: [freetds] FreeTDS does not work with Sybase SQL Anywhere 10, 11
or 12 -- sp_datatype_info()

On Wed, 6 Feb 2013 17:44:38 +0000
Tony Esposito <Tony.Esposito AT region10.org> wrote:

> FreeTDS needs to not be dependent on that sp in order for it to be
> used with SQL Anywhere. Just need to find out what it does.
>
> Otherwise, FreeTDS only works with Sybase ASE.

Tony, if you're willing to do some legwork, I think we can solve this
together.

The attached file implements the resultset returned by sp_datatype_info in C
as an array of struct. The data come from SQL Server 2005. If you extend
the array for SQL Anywhere, we can reference it in SQLGetTypeInfo().

The inputs to SQLGetTypeInfo() are:

1. server product version (implicitly, from connection) 2. datatype
manifest constant 3. ODBC version

We can implement tds_datatype_info() as a binary search of the above array
using those inputs. If the function fails, we can fall back to calling
sp_datatype_info on the server. (The local binary search will be very fast,
microseconds at most.) If both fail, the function fails.

> I would see this as a limitation to the product.

I would, too, if FreeTDS were a product. Since it's a project, the only real
limitation is our own time, skill, and imagination.

Regards,

--jkl

-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.2897 / Virus Database: 2639/6081 - Release Date: 02/04/13





Archive powered by MHonArc 2.6.24.

Top of Page