Re: FreeTDS does not work with Sybase SQL Anywhere 10, 11 or 12 -- sp_datatype_info()
Tony Esposito <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <197C3C50EA91BF4DBE52558A4007816B6AC4CC39@CH1PRD0202MB125.namprd02.prod.outlook.com> |
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: [email protected] [mailto:[email protected]] On Behalf Of James K. Lowden Sent: Wednesday, February 06, 2013 3:12 PM To: [email protected] 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 <[email protected]> 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