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

Stallon Selvan <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
TDSVER=7.0  ./tsql -S MYDB -U sa -P mypw
locale is "en_IN"
locale charset is "UTF-8"
There was a problem connecting to the server

I know it says this, but via PHP it works perfectly. (somehow I remember i
could use tsql to connect previously..)

Also I can properly connect with -H and -p parameters properly...

TDSVER=7.0 ./tsql -H 192.168.1.11 -p 1433 -U sa -P mypw
locale is "en_IN"
locale charset is "UTF-8"
1> use mydbname
2> go
1>

Regards,
Stallon Selvan


On Thu, Jul 22, 2010 at 11:50 PM, Tacho <[email protected]> wrote:

> Sorry. in last statement hyphen is missing in S:
>
> tsql -S sqlserver -U username -P password
>
> regards.
>
>
> 2010/7/22 Tacho <[email protected]>
>
> > 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 <[email protected]>
> >
> >> ./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 <[email protected]> wrote:
> >>
> >> > what is your freetds version: please run tsql -C
> >> >
> >> > Regards.
> >> >
> >> > 2010/7/22 Stallon Selvan <[email protected]>
> >> >
> >> > > 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 <
> >> > > [email protected]> 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 <
> >> [email protected]>
> >> > > > 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 <[email protected]>:
> >> > > > > > 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 <
> >> > [email protected]
> >> > > >
> >> > > > > 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 <[email protected]>:
> >> > > > > >> > 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 <
> >> > > > [email protected]>
> >> > > > > >> wrote:
> >> > > > > >> >
> >> > > > > >> >>
> >> > > > > >> >> Il giorno 13/lug/2010, alle ore 18.53, Stallon Selvan <
> >> > > > > >> >> [email protected]> 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
> >> > > > > >> [email protected]
> >> > > > > >> http://lists.ibiblio.org/mailman/listinfo/freetds
> >> > > > > >>
> >> > > > > > _______________________________________________
> >> > > > > > FreeTDS mailing list
> >> > > > > > [email protected]
> >> > > > > > http://lists.ibiblio.org/mailman/listinfo/freetds
> >> > > > > >
> >> > > > > _______________________________________________
> >> > > > > FreeTDS mailing list
> >> > > > > [email protected]
> >> > > > > 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
> >> > > > [email protected]
> >> > > > http://lists.ibiblio.org/mailman/listinfo/freetds
> >> > > >
> >> > > _______________________________________________
> >> > > FreeTDS mailing list
> >> > > [email protected]
> >> > > http://lists.ibiblio.org/mailman/listinfo/freetds
> >> > >
> >> > _______________________________________________
> >> > FreeTDS mailing list
> >> > [email protected]
> >> > http://lists.ibiblio.org/mailman/listinfo/freetds
> >> >
> >> _______________________________________________
> >> FreeTDS mailing list
> >> [email protected]
> >> http://lists.ibiblio.org/mailman/listinfo/freetds
> >>
> >
> >
> _______________________________________________
> FreeTDS mailing list
> [email protected]
> http://lists.ibiblio.org/mailman/listinfo/freetds
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.