freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] SQLPrepare() can't arrange error infomation whenDBshutdown occured after SQLConnect()
- From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
- To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] SQLPrepare() can't arrange error infomation whenDBshutdown occured after SQLConnect()
- Date: Tue, 13 Jun 2006 14:58:30 +0200
> >
> > ---contents of prepare.php---
> > $conn = odbc_connect('FreeTDS','sqlr','sqlr');
> > $query = 'select 1;';
> > sleep (10) ;
> > # shutdown database
> > $s = @odbc_prepare($conn,$query); # odbc_do in do.php
> > echo "----------------\n";
> > if($e=odbc_error())
> > {
> > echo "state = $e\n";
> > echo "msg = ".odbc_errormsg($conn)."\n";
> > }
> > ----------------------------------------
> >
> > I could find the patch file mentioned above in the mailing
> > list archive .
> > It might be more convenient if patch files reside with
> > source tarballs at
> > FTP site.
> >
>
> Currently you can find patch at
> http://freetds.sourceforge.net/ (post 0.63 patch)
> In this case there is a sligth difference between what patch
> fix and what you want. The patch catch error that server
> returns preparing statement while the broken connection error
> is not sended by server but detected by library. I don't know
> if 0.63 or 0.64 can handle this situation... I'll try to
> reproduce the problem...
>
I can confirm the problem... added a prepclose test
http://freetds.cvs.sourceforge.net/freetds/freetds/src/odbc/unittests/pr
epclose.c?revision=1.1
the problem is that tds_submit_prepare returns error but do not set any
error. I think that correct bahavior would be to use tds_client_msg in
(or near) tds_close_socket.
freddy77
-
Re: [freetds] SQLPrepare() can't arrange error infomation whenDBshutdown occured after SQLConnect(),
ZIGLIO, Frediano, VF-IT, 06/13/2006
- Re: [freetds] SQLPrepare() can't arrange error infomationwhenDBshutdown occured after SQLConnect(), MARTYN TAYLOR, 06/13/2006
Archive powered by MHonArc 2.6.24.