Problem with float-Fields using FreeTDS and PHP4 with MS SQL 7.0
wegmeyer at talknet.de
Mon Jul 3 07:22:16 EDT 2000
Can anybody help me with the follwoing configuration ?
I have to access an MS SQL 7.0 Server for my intranet,
running on SuSE Linux 6.x,
doing that with the sybase libs and PHP3 works mostly
Using PHP4.0 does not work at all ( tons of emalloc errors)
Using 4.01 works again, but only using char/varchar, int and
I just tried out freeTDS using a cgi-Version of PHP 4.01 and
freeTDS Vers. 0.50 wich i configured for TDS-Version 7.0 with
the dbmfix option enabled.
Accessing my database with freeTDS was fairly easy, but there is
still one problem remainig:
I can't access fields that are declared as float. doing a direct access
via select price from table results in strange numbers like
14.08945123344 where the entry really is 2790.00.
using convert(char(12),price) produces randomly correct Prices with
some results containing nonsense like "(a|§..." and a segmentation fault
after x processed rows ( x < 10). Even a convert(int,price) does not work!
Has anyone an idea how to cope with float-Fields from PHP4 via freeTDS ?
More information about the FreeTDS