Skip to Content.
Sympa Menu

freetds - Re: Changed database context?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian Bruns <camber AT ais.org>
  • To: TDS Development Group <freetds AT franklin.metalab.unc.edu>
  • Subject: Re: Changed database context?
  • Date: Mon, 17 Jun 2002 17:28:26 -0400 (EDT)


John,

FreeTDS simply forwards messages from the server to the application
(perl/DBD::Sybase in this case). Many applications supress the 5701
message, sqsh and DBD::Sybase both do for instance. There was an issue on
some big endian platforms with TDS 4.2, but IIRC that has been fixed for
some time. what platform are you running on, are you using 0.53 or a CVS
snapshot and is there a message number (other than 5701) included with the
message?

Brian

On Mon, 17 Jun 2002, Jonathan Hirschi wrote:

>
> James,
>
> thanks for your help. I appreciate you taking time to answer my questions.
>
> I am using all of the defaults as far as freetds and error handlers are
> concerned. I don't have the same problem with other drivers (mysql). I
> just seem to have this problem in connection with the sybase driver and
> freetds. the code below always prints out the "Changed database context to
> bugdb". The configuration for freetds.conf is the default configuration
> for
> freetds. I have this same problem no matter whether i specify version 4.2
> or 7.0. There are no error codes being sent out, as far as i can see.
>
> thanks,
>
>
> #!/usr/bin/perl
> #
> use DBI;
>
> my $dbh = DBI->connect("dbi:Sybase:server=devdb", 'cvsuser', 'test',
> {PrintError => 10});
>
> die "Unable for connect to server $DBI::errstr"
> unless $dbh;
>
> my $rc;
> my $sth;
>
> $sth = $dbh->prepare("select * from tblcvstransaction");
> if($sth->execute) {
> while(@dat = $sth->fetchrow) {
> print "@dat\n";
> }
> }
>
>
> > > From: Jon Hirschi [mailto:jhirschi AT hotmail.com]
> > > Sent: June 17, 2002 3:06 PM
> > >
> > > Is there any way to turn off the message?
> > >
> > > the message being sent to the screen is "changed database
> > > context to <name>"
> >
> >Jon,
> >
> >I checked the message handler (src/ctlib/ctutil.c). No writes stderr, no
> >printf at all.
> >
> >Have you set an error handler in your perl code? That would be the place
> >to
> >trap the message (by number) and decide what to print, if anything. If you
> >have set one, is it being called for other messages, just not this one?
> >
> >Regards,
> >
> >--jkl
>
>
> _________________________________________________________________
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
>
> ---
> You are currently subscribed to freetds as: [camber AT ais.org]
> To unsubscribe, forward this message to $subst('Email.Unsub')
>
>





Archive powered by MHonArc 2.6.24.

Top of Page