Skip to Content.
Sympa Menu

freetds - Re: [freetds] Differentiate Sybase from SQL Server

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: John Kendall <john AT capps.com>
  • To: FreeTDS Group <freetds AT lists.ibiblio.org>, Igor Korot <ikorot01 AT gmail.com>
  • Subject: Re: [freetds] Differentiate Sybase from SQL Server
  • Date: Sun, 29 Jul 2018 06:36:26 +0000



> On Jul 28, 2018, at 11:11 PM, Igor Korot <ikorot01 AT gmail.com> wrote:
>
> Hi,
>
> On Sun, Jul 29, 2018 at 12:13 AM, John Kendall <john AT capps.com> wrote:
>> Igor,
>> Would
>>
>> select @@version
>>
>> work for you?
>
> It probably will, but I'm curious if there is something inside the tds
> structure or the statement/connection
> structure that will help.
>
> Unless Frediano has some other idea.
>
> Thank you.

The TDS version is reliable. If it's 5, it's Sybase. Otherwise it's MS.
That's used in src/apps/defncopy.c (line 231):


https://github.com/FreeTDS/freetds/blob/master/src/apps/defncopy.c#L231


>
>> John
>>
>>
>>
>>
>>
>>> On Jul 28, 2018, at 10:04 PM, Igor Korot <ikorot01 AT gmail.com> wrote:
>>>
>>> Hi,
>>> Is there a way to differentiate between Sybase and SQL Server
>>> other than by the TDS protocol version?
>>>
>>> I need an implementation of SQLDescribeCol(), but the information
>>> about column is located in a different table for those DBMSes.
>>> I can probably check what TDS version is used for a connection,
>>> but it is not very reliable way of doing things.
>>>
>>> Thank you.
>>> _______________________________________________
>>> FreeTDS mailing list
>>> FreeTDS AT lists.ibiblio.org
>>> https://url.emailprotection.link/?a95lm_Yz0z4VwVi9HMyQSLtTmToR48n_2Es8x43dIoxidNPkdt4wWeUhbwN1QnbrzawQmZ1BjbOu5bK1zLGmRSw~~
>>
>> _______________________________________________
>> FreeTDS mailing list
>> FreeTDS AT lists.ibiblio.org
>> https://url.emailprotection.link/?a95lm_Yz0z4VwVi9HMyQSLtTmToR48n_2Es8x43dIoxidNPkdt4wWeUhbwN1QnbrzawQmZ1BjbOu5bK1zLGmRSw~~
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> https://url.emailprotection.link/?a95lm_Yz0z4VwVi9HMyQSLtTmToR48n_2Es8x43dIoxidNPkdt4wWeUhbwN1QnbrzawQmZ1BjbOu5bK1zLGmRSw~~





Archive powered by MHonArc 2.6.24.

Top of Page