Skip to Content.
Sympa Menu

freetds - Re: [freetds] SQL Server 2005 Stored Procedures in PHP with TDS Version 8.0 don't work (7.0 works well)

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Tacho <tachoymu AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] SQL Server 2005 Stored Procedures in PHP with TDS Version 8.0 don't work (7.0 works well)
  • Date: Thu, 22 Jul 2010 11:18:44 -0700

Please, run tsql at command line, but before do it, set TDSVER=7.0 and run
afterwards, i.e:

# TDSVER=7.0 tsql -S sqlserver -U username -P password
or
# export TDSVER=7.0
# tsql S sqlserver -U username -P password

Regards.


2010/7/22 Stallon Selvan <stallonselvan AT gmail.com>

> ./tsql -C
> Compile-time settings (established with the "configure" script)
> Version: freetds v0.82
> freetds.conf directory: /usr/local/etc
> MS db-lib source compatibility: no
> Sybase binary compatibility: no
> Thread safety: yes
> iconv library: yes
> TDS version: 5.0
> iODBC: no
> unixodbc: no
> Regards,
> Stallon Selvan
>
>
> On Thu, Jul 22, 2010 at 11:42 PM, Tacho <tachoymu AT gmail.com> wrote:
>
> > what is your freetds version: please run tsql -C
> >
> > Regards.
> >
> > 2010/7/22 Stallon Selvan <stallonselvan AT gmail.com>
> >
> > > Robert... how do I check that? It sure seems to be ok...
> > >
> > > @Freddy.. I narrowed down to the problem being specific to the data
> type
> > > for
> > > boolean variables.
> > >
> > > See the line which seems to be causing the issue:
> > >
> > > mssql_bind($stmt3, '@bPublic', 1, SQLBIT, false, false, 1);
> > >
> > > SQLBIT seems to be having problem with TDS version 8.0, is it seen
> > before?
> > > or is it only me?
> > > i.e:
> > > Regards,
> > > Stallon Selvan
> > >
> > >
> > > On Thu, Jul 22, 2010 at 10:59 PM, Robert Gonzalez <
> > > robert AT robert-gonzalez.com> wrote:
> > >
> > > > And are you sure that your environment variables for your web server
> > are
> > > > set
> > > > properly? That has bitten me in the behind a few times.
> > > >
> > > > On Thu, Jul 22, 2010 at 1:58 AM, Frediano Ziglio <freddy77 AT gmail.com
> >
> > > > wrote:
> > > >
> > > > > Mmm.... is quite strange that changing only protocol cause entry do
> > > > > not be readed. Usually problems with PHP are due to the fact that
> PHP
> > > > > user is different from your one. Are you sure that freetds.conf
> file
> > > > > you change are the right one and that is still readable by PHP
> after
> > > > > your change ?
> > > > >
> > > > > freddy77
> > > > >
> > > > > 2010/7/22 Stallon Selvan <stallonselvan AT gmail.com>:
> > > > > > Freddy... just a typo... The DB was called something else, i
> just
> > > > > renamed
> > > > > > it for privacy...
> > > > > >
> > > > > > Consider its defined MYDB both ways.
> > > > > >
> > > > > > Regards,
> > > > > > Stallon Selvan
> > > > > >
> > > > > >
> > > > > > On Thu, Jul 22, 2010 at 2:16 PM, Frediano Ziglio <
> > freddy77 AT gmail.com
> > > >
> > > > > wrote:
> > > > > >
> > > > > >> This problem has nothing to do with protocol. You specified a
> > > > > >> "MSSQLDB" server while in freetds.conf you have a "MYDB" server.
> > > > > >>
> > > > > >> freddy77
> > > > > >>
> > > > > >>
> > > > > >> 2010/7/20 Stallon Selvan <stallonselvan AT gmail.com>:
> > > > > >> > Thanks a lot for replying guys... here is the tdsdump
> > > > > >> >
> > > > > >> > log.c:190:Starting log file for FreeTDS 0.82
> > > > > >> > on 2010-07-12 18:02:50 with debug flags 0x4fff.
> > > > > >> > iconv.c:197:names for ISO-8859-1: ISO-8859-1
> > > > > >> > iconv.c:197:names for UTF-8: UTF-8
> > > > > >> > iconv.c:197:names for UCS-2LE: UCS-2LE
> > > > > >> > iconv.c:197:names for UCS-2BE: UCS-2BE
> > > > > >> > iconv.c:363:iconv to convert client-side data to the "UTF-8"
> > > > character
> > > > > >> set
> > > > > >> > iconv.c:516:tds_iconv_info_init: converting "UTF-8"->"UCS-2LE"
> > > > > >> > login.c:405:IP address pointer is empty
> > > > > >> > login.c:407:Server MSSQLDB not found!
> > > > > >> > mem.c:563:tds_free_all_results()
> > > > > >> >
> > > > > >> > Regards,
> > > > > >> > Stallon Selvan
> > > > > >> >
> > > > > >> >
> > > > > >> > On Tue, Jul 20, 2010 at 3:00 AM, Frediano Ziglio <
> > > > freddy77 AT gmail.com>
> > > > > >> wrote:
> > > > > >> >
> > > > > >> >>
> > > > > >> >> Il giorno 13/lug/2010, alle ore 18.53, Stallon Selvan <
> > > > > >> >> stallonselvan AT gmail.com> ha scritto:
> > > > > >> >>
> > > > > >> >> freetds.conf:
> > > > > >> >>> [MYDB]
> > > > > >> >>> host = 192.168.1.11
> > > > > >> >>> port = 1433
> > > > > >> >>> tds version = 7.0
> > > > > >> >>> client charset = UTF-8
> > > > > >> >>>
> > > > > >> >>> This works perfectly however if I switch to tds version =
> 8.0
> > > > > (which I
> > > > > >> >>> want
> > > > > >> >>> to), throws exceptions like:
> > > > > >> >>>
> > > > > >> >>> The incoming tabular data stream (TDS) remote procedure call
> > > (RPC)
> > > > > >> >>> protocol
> > > > > >> >>> stream is incorrect. Parameter 2 ("@bPublic"): Data type
> 0x32
> > is
> > > > > >> unknown.
> > > > > >> >>>
> > > > > >> >>> Additionally sometimes, giving me the following errors in
> some
> > > > > stored
> > > > > >> >>> procedures
> > > > > >> >>>
> > > > > >> >>> stored procedure execution failed in
> > > > > >> >>> /home/wwwuser/public_html/db.mssql.php
> > > > > >> >>> on line 558.
> > > > > >> >>> user warning: Error: - Changed database context to
> > > 'Staging_DB'.e
> > > > > >> >>>
> > > > > >> >>> Regards,
> > > > > >> >>> Stallon Selvan
> > > > > >> >>>
> > > > > >> >>> Please post a tdsdump.
> > > > > >> >>
> > > > > >> >> Freddy77
> > > > > >> >>
> > > > > >> _______________________________________________
> > > > > >> FreeTDS mailing list
> > > > > >> FreeTDS AT lists.ibiblio.org
> > > > > >> http://lists.ibiblio.org/mailman/listinfo/freetds
> > > > > >>
> > > > > > _______________________________________________
> > > > > > FreeTDS mailing list
> > > > > > FreeTDS AT lists.ibiblio.org
> > > > > > http://lists.ibiblio.org/mailman/listinfo/freetds
> > > > > >
> > > > > _______________________________________________
> > > > > FreeTDS mailing list
> > > > > FreeTDS AT lists.ibiblio.org
> > > > > http://lists.ibiblio.org/mailman/listinfo/freetds
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Robert Gonzalez
> > > > http://www.robert-gonzalez.com
> > > > http://twitter.com/RobertGonzalez
> > > > http://www.linkedin.com/in/robertanthonygonzalez
> > > > _______________________________________________
> > > > FreeTDS mailing list
> > > > FreeTDS AT lists.ibiblio.org
> > > > http://lists.ibiblio.org/mailman/listinfo/freetds
> > > >
> > > _______________________________________________
> > > FreeTDS mailing list
> > > FreeTDS AT lists.ibiblio.org
> > > http://lists.ibiblio.org/mailman/listinfo/freetds
> > >
> > _______________________________________________
> > FreeTDS mailing list
> > FreeTDS AT lists.ibiblio.org
> > http://lists.ibiblio.org/mailman/listinfo/freetds
> >
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>




Archive powered by MHonArc 2.6.24.

Top of Page