Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Dec 2000 16:22:22 +0100
From:      Imdat Solak <iso@burdadigital.com>
To:        Joaqu=?ISO-8859-1?B?7W4gSGVybuE=?=ndez Rico <joaquinh01@uswest.net>, <freebsd-database@freebsd.org>
Subject:   Re: PHP4 accessing Sybase with freetds
Message-ID:  <B65EA43D.1187%iso@burdadigital.com>

next in thread | raw e-mail | index | archive | help
On 12/14/00 3:40 PM, "Joaqu=EDn Hern=E1ndez Rico" <joaquinh01@uswest.net> wrote=
:

>>> I have not succeeded getting the native FreeBSD Sybase libraries to
> build
>>> anything like PHP of SybPerl on a 4.x FreeBSD box. It might have to do
> with
>>> the
>>> fact that FreeBSD 3.x emulates Redhat 5.x and FreeBSD 4.x emulates
> redHat 6.x
>>> but I am not sure...
>>=20
>> The FreeBSD Sybase Libraries don't work, AFAIK, I tried and it didn't wo=
rk
> at all.
>=20
> Do you remember what kind of error messages you were getting?
Hmmm, not really, something like "Cannot connect" or so, as I try to
remember.
=20
> Thanks,  I had seen your instructions before, very helpful...
>=20
> Reinoud, your assumption is correct, it is Sybase Anywhere 7.0.
> Previously, I had followed Imdat's instructions as far as the various
> configuration files.   Today I will try starting at the beginning...
>=20
I never tried it with SA, only Adaptive 11.x

> Unfortunately,  our DBA is not the most cooperative individual and he is
> rather NT-centric...  but I know there has to be an ''accessible" way of
> communicating with SA from fBSD, for the data-gathering part of our syste=
m
> runs on QNX...
>=20
With the freetds implementation, you can also connect to M$ SQL-Server (jus=
t
a note ;-)

> I with give it another try, and if you are interested,   I will post my
> findings....
>=20
Yes, of course,please do so.

Oh wait! I re-read your mail before: You say you get "invalid marker: 0!",
right? That's perfectly okay, AFAIK, as freetds does NOT support all TDS
markers, which are in the newest TDS (7? 5? Ah egad, I forgot ;-) What you
do to get rid of it is the following:

Comment out the following line:
<freetds0.5-path>/src/tds/token.c:134

For me it was:
[SOME OTHER CODE]
      case TDS_COL_INFO_TOKEN:
         tds_process_col_info(tds);
         break;=20
      case TDS_CMP_ROW_TOKEN:
         tds_process_compute(tds);
         break;=20
      case TDS_ROW_TOKEN:
         tds_process_row(tds);
         break;
      default:
//         fprintf(stderr,"Unknown marker: %d!!\n",marker); /* <- THIS LINE
*/
         return 0;
   }
}
=20
/*=20
** tds_process_login_tokens() is called after sending the login packet
** to the server.  It returns the success or failure of the login
** dependent on the protocol version. 4.2 sends an ACK token only when
** successful, TDS 5.0 sends it always with a success byte within
*/
int tds_process_login_tokens(TDSSOCKET *tds)
[SOME FOLLOWING CODE]

This did not change anything for me, it works fine, except that I don't get
this message any more. I figure, that I could just ignore this (well I don'=
t
really know all the side effects, so therefore, please let me know if you
find any side effects).

Now, after reading the freetds0.5 README again, I found out following:

[--- COPIED OUT OF `README' ---]
    FreeTDS will run at protocol versions 4.2, 4.6, or 5.0 and thus can
access both Sybase and Microsoft SQL-Servers.  Note: Microsoft SQL servers
do not support TDS versions above 4.2 and need to be configured with
the --with-tdsver=3D4.2 flag.

Experimental support for TDS 7.0 (the version used by MS SQL Server 7.0) is
now included. It works for me but beyond that I can't promise much.  That
said,TDS 7.0 support can be configured by using the --with-tdsver=3D7.0 when
running configure.
[--- END COPIED OUT OF `README' ---]

Please check if SA uses TDS 7.0, if so, please have a look at supporting
TDS7.0 (s. Above).
I hope this helps
Best

Imdat
iso@imdat.de ///

--=20
Imdat Solak
Burda Digital GmbH * Arabellastr. 23 * 81925 Munich * Germany
      iso@burdadigital.com * +49-89-9250-2714 * -2190 (fax)




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-database" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B65EA43D.1187%iso>