Skip to Content.
Sympa Menu

freetds - Re: Getting closer.

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian Bruns <camber AT umcc.ais.org>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: Getting closer.
  • Date: Sun, 29 Aug 1999 23:39:18 -0400 (EDT)


I saw this to, but I assumed it was the way main.t is written:

while(@dat = $sth->fetchrow) {
++$rows;
foreach (@dat) {
$_ = '' unless $_;
}
print "@dat\n";
}

The unless $_ thing knocks out 0 values. If I comment out the foreach
loop I get 0 returned (not 0.0 but hey close enough!)

So it is working for me is I guess what I'm saying.

Can you post your code?

Cheers,

Brian

On Sun, 29 Aug 1999, Jaye Mathisen wrote:

>
> nope, no difference. floats with 0.0 as a value don't get converted in
> DBD::Sybase.
>
> If I change them to a value besides 0.0, it reports it back just fine.
>
> ie, change taxrate to 1.1, and I get 1.1 out of DBD::Sybase, but taxrate 2
> which is 0.0 in the database returns nothing that I can see.
>
> On Sat, 28 Aug 1999, Brian Bruns wrote:
>
> >
> > Jaye,
> >
> > Try the stuff in CVS now. I made one small change and hopefully it'll
> > work.
> >
> > Brian
> >
> > On Thu, 26 Aug 1999, Jaye Mathisen wrote:
> >
> > >
> > >
> > > OK, with sqsh-1.7, my query is now returning great info. timestamp
> > > field
> > > came through OK, and the floats are correct.
> > >
> > > DBD::Sybase doesn't like the floats though. Everything else including
> > > the
> > > timestamp came through, but I'm not so sure where the problem is, if
> > > it's
> > > still in the ctlib stuff, or really in DBD::Sybase.
> > >
> > > Note the portion of the trace:
> > >
> > > <- FETCH= [ 'id' 'name' 'guarantor' 'taxrate' 'taxrate2' 'date'
> > > 'active' 'taxid' 'staffnum' 'timestamp' 'attn' 'addr1' 'addr2' '
> > > [...]
> > > -> FETCH for DBD::Sybase::st (DBI::st=HASH(0x8145e7c)~INNER 'NAME')
> > > -> FETCH for DBD::Sybase::st (DBI::st=HASH(0x8145e7c)~INNER
> > > 'NULLABLE')
> > > <- FETCH= [ '' 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
> > > 1 1
> > > 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ] at x.pl line 44.
> > > -> fetchrow for DBD::Sybase::st (DBI::st=HASH(0x8057890)~0x8145e7c)
> > > <- fetchrow= ( 10196 'Jaye Mathisen' 0 0 0 'Feb 05 1998 12:00AM' 'Y'
> > > [stuff deleted]
> > >
> > > In the row data, the three fields after "Jaye Mathisen" has 0 0 0.
> > >
> > > The first 0 is an int field, and it's correct. But the next 2 fields
> > > are
> > > both floats. I am unsure if the 0 there as opposed to 0.0 or somesuch
> > > is
> > > related to the problem.
> > >
> > > I'm using DBI-1.13, with DBD::Sybase-0.19... I think if I had my floats
> > > in DBD::Sybase, I'd be off to the races. :)
> > >
> > > On Thu, 26 Aug 1999, Brian Bruns wrote:
> > >
> > > >
> > > > Ok, I've checked in the varbinary conversion stuff. There shouldn't
> > > > be
> > > > anymore of the 'Attempting to convert unknown source type xx'
> > > > messages. If
> > > > you see any, let me know any I can patch it up in pretty short order.
> > > >
> > > > You guys have been really great with the problem reports. It makes my
> > > > life alot easier. :)
> > > >
> > > > Well I'm off to bed, g'night everyone
> > > >
> > > > Brian
> > > >
> > > > By the way, if anybody is looking for an easy task to sink their teeth
> > > > into, there is a lot of relatively easy but monotonous work to do in
> > > > the
> > > > convert functions to go from one datatype to the others. It's all in
> > > > src/tds/convert.c and the code should be pretty easy to follow.
> > > >
> > > >
> > > >
> > > > ---
> > > > You are currently subscribed to freetds as: mrcpu AT internetcds.com
> > > > To unsubscribe, forward this message to $subst('Email.Unsub')
> > > >
> > >
> > >
> > > ---
> > > You are currently subscribed to freetds as: camber AT ais.org
> > > To unsubscribe, forward this message to $subst('Email.Unsub')
> > >
> > >
> >
> >
> > ---
> > You are currently subscribed to freetds as: mrcpu AT internetcds.com
> > To unsubscribe, forward this message to $subst('Email.Unsub')
> >
>
>
> ---
> 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