Skip to Content.
Sympa Menu

freetds - Re: Much better. 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: Much better. Re: Getting closer.
  • Date: Mon, 30 Aug 1999 13:52:05 -0400 (EDT)



Ah! Good to hear. After so many problems it is natural to the problem lay
within FreeTDS . I know I did anyway, and I won't mention the
embarrassingly long time it took me to track it down ;)

I'm sure there are probably a few other small issues, probably datatype
support kinda things. Just holler when you run into them.

Brian

On Mon, 30 Aug 1999, Jaye Mathisen wrote:

>
>
> OK, clarification, apology, and much happiness.
>
> I had just taken main.t, replaced the query for test 4 with my query, and
> was trying that. Hence I was hitting the defined $_ issue listed below.
>
> Now it returns just what I expect, modulo that it's 0 instead of 0.0, but
> I can work with that just fine.
>
> So my apologies for the false alarm, it was and is working.
>
>
> On Mon, 30 Aug 1999, Michael Peppler wrote:
>
> > Brian Bruns writes:
> > > 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!)
> >
> > Arrrrgggg!!!!!
> >
> > That
> > $_ = '' unless $_;
> > is there to avoid warnings when accessing undefined variables/values
> > (which is what DBD::Sybase returns for NULL values).
> >
> > But of course this was for the Sybase sysusers table which does not
> > have any float columns. So this row should be changed to
> > $_ = '' unless defined $_;
> >
> > which I'll do in the DBD::Sybase source right now.
> >
> > Michael
> >
> > >
> > > 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')
> > > >
> > > >
> > >
> > >
> > > ---
> > > You are currently subscribed to freetds as: mpeppler AT peppler.org
> > > To unsubscribe, forward this message to $subst('Email.Unsub')
> > >
> >
> > --
> > Michael Peppler -||- Data Migrations Inc.
> > mpeppler AT peppler.org -||- http://www.mbay.net/~mpeppler
> > Int. Sybase User Group -||- http://www.isug.com
> > Sybase on Linux mailing list: ase-linux-list AT isug.com
> >
> > ---
> > 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