Skip to Content.
Sympa Menu

freetds - RE: [freetds] problem with UPDATE query

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Russell Kroboth <rkroboth AT visitraleigh.com>
  • To: 'FreeTDS Development Group' <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] problem with UPDATE query
  • Date: Fri, 28 Feb 2003 09:25:46 -0500

Apparently my use of the deprecated tag was the problem; once I changed it,
it worked like a charm. Thanks a million Michael!

-Rusty


> -----Original Message-----
> From: Michael Peppler [mailto:mpeppler AT peppler.org]
> Sent: Thursday, February 27, 2003 7:36 PM
> To: FreeTDS Development Group
> Subject: Re: [freetds] problem with UPDATE query
>
>
> On Thu, 2003-02-27 at 15:35, Russell Kroboth wrote:
> > I am having a problem using the UPDATE statement in a Perl
> script with my
> > new Freetds setup, I was wondering if you could tell me if
> you can see what
> > I'm missing or if it's even FreeTDS related at all. I am
> using unixodbc ,
> > freeTDS and DBD:Sybase. This script does not update the
> field as expected:
> >
> > #!/usr/bin/perl
> > use DBI;
> > require "DBconnect.cgi";
> > $dbh = DBI->connect($data_source, $username, $password, 'Sybase')
>
> That connect() call is deprecated. Use
>
> $dbh = DBI->connect("dbi:Sybase:server=<servername>", $username,
> $password)
>
> instead.
>
> > &DBerror;
> > $dbh->do("use Partners") || die &DBerror;
> > $sql="UPDATE deals SET accountno = 'somethingelse' WHERE
> hotdealnum=15";
> > $rows=$dbh->do($sql) || die &DBerror;
>
> Turn on tracing and see what really happens:
>
> DBI->trace(3);
> $dbh->do($sql);
>
> > print "$rows affected\n";
> > exit;
> >
> > result: "-1 rows affected"
>
> Note that -1 here means that the number of rows affected is not known,
> not that an error occurred. Are you positive that no rows are
> affected?
>
> Michael
> --
> Michael Peppler Data Migrations, Inc.
> mpeppler AT peppler.org http://www.mbay.net/~mpeppler
> Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available
> for short or
> long term contract positions -
http://www.mbay.net/~mpeppler/resume.html
_______________________________________________
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