Skip to Content.
Sympa Menu

freetds - Re: Strange data results....

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Franck Martin <Franck AT sopac.org>
  • To: 'TDS Development Group' <freetds AT franklin.oit.unc.edu>
  • Subject: Re: Strange data results....
  • Date: Sun, 9 Jun 2002 20:44:45 +1200


Brian and others...

The problem is always the same, if I redo the same query I have exactly the
same strange behavior character by character...

It seems indeed that it is related to non-null terminated strings. From the
flow of data from the capture I see that the string is not terminated and
only the pair of bytes before the string gives the length of the string (ie
0400 for AN or 1c00 for Annual Reports).

I haven't sqsh so I can't tell... Will try to download and install to see...

I use the sybase library and not the ct-sybase library... The rpms I use are
the ones on Mandrake Cooker as contribs. freetds-0.53.1-mdk1.rpm
php-sybase-....-mdk.rpm (I made them myself...) You should be able to get
them on www.rpmfind.net especially to read the spec file for the compilation
options (no dbmfix, protocol 7.0).

As for the table structure it is:
ListReportType:
ReportType nvarchar(2)
ReportTypeName nvarchar(50)
tz timestamp(8)

On some other queries I have similar behaviors that I can partly control
with trim but not always...

Check the url I gave to see for yourself... a refresh will always give you
the same output:

<a href="reportsindex.html?ss=type&vv=AR">Annual Reports</a><BR>
<a href="reportsindex.html?ss=type&vv=BM">Bathymetric Map Series</a><BR>
<a href="reportsindex.html?ss=type&vv=CH">Charts tric</a><BR>
<a href="reportsindex.html?ss=type&vv=CM">Coastal Map Series ies</a><BR>
<a href="reportsindex.html?ss=type&vv=CR">Cruise Report ries ies</a><BR>
<a href="reportsindex.html?ss=type&vv=DR">Disaster Reduction Reports</a><BR>
<a href="reportsindex.html?ss=type&vv=EN">Pacific Energy Newsletters</a><BR>
<a href="reportsindex.html?ss=type&vv=GN">South Pacific Marine Geological
Notes</a><BR>
<a href="reportsindex.html?ss=type&vv=GS">GIS and RS Newsletters ological
Notes</a><BR>
<a href="reportsindex.html?ss=type&vv=JC">Joint Contribution Reports ical
Notes</a><BR>
<a href="reportsindex.html?ss=type&vv=LR">Preliminary Reports eports ical
Notes</a><BR>
<a href="reportsindex.html?ss=type&vv=MR">Miscellaneous Reports orts ical
Notes</a><BR>
<a href="reportsindex.html?ss=type&vv=NR">Training Reports orts orts
ical</a><BR>
<a href="reportsindex.html?ss=type&vv=PR">Trip Reports rts orts or</a><BR>
<a href="reportsindex.html?ss=type&vv=PS">Proceedings rts orts</a><BR>
<a href="reportsindex.html?ss=type&vv=SN">SOPAC Newsletters rts r s ical
o</a><BR>
<a href="reportsindex.html?ss=type&vv=TB">Technical Bulletins s r s ical o
es</a><BR>
<a href="reportsindex.html?ss=type&vv=TR">Technical Reports s s r s ical
o</a><BR>
<a href="reportsindex.html?ss=type&vv=WP">Work Program Reports r s ical o
es</a><BR>
<a href="reportsindex.html?ss=type&vv=PJ">SOPAC Projects ports r s
i</a><BR>
<a href="reportsindex.html?ss=type&vv=RB">Risky Business ports r s
i</a><BR>
<a href="reportsindex.html?ss=type&vv=WS">Water and Sanitation Newsletters o
es</a><BR>

Cheers and have fun...

Franck Martin
Network and Database Development Officer
SOPAC South Pacific Applied Geoscience Commission
Fiji
E-mail: franck AT sopac.org <mailto:franck AT sopac.org>
Web site: http://www.sopac.org/
<http://www.sopac.org/> Support FMaps: http://fmaps.sourceforge.net/
<http://fmaps.sourceforge.net/>
Certificate: https://www.sopac.org/ssl/

This e-mail is intended for its addresses only. Do not forward this e-mail
without approval. The views expressed in this e-mail may not be necessarily
the views of SOPAC.



-----Original Message-----
From: Brian Bruns [mailto:camber AT ais.org]
Sent: Sunday, 9 June 2002 12:51
To: TDS Development Group
Subject: [freetds] Re: Strange data results....


Franck,

Does this happen consistantly with some querys and doesn't happen for
others, or do you mean that it sometimes happens, sometimes not?

Please post the output with an explaination of what strange results are
occuring and what types of fields those are on.

Brian

On Thu, 6 Jun 2002, Franck Martin wrote:

> I'm using freetds snapshot and I'm getting strange results in php 4.1.2
>
> It seems that the data buffer is not fully cleared or something like
> this...
>
> cf http://www.sopac.org/Data/virlib/index.html
> With Netscape instead of explorer you can see that there are specials
> character on output
>
> if I change the freetds.conf to use ver 4.2 or 50 instead of 7.0 php
> segfaults...
>
> I have captured the data flow and it seems that it is correct ie for the
> fields stream:
>
> 00d1 0400 "A"00 "R"00 1c00 "A"00 "n"00 "n"00 "u"00 "a"00 "l"00
> ..[Report]..
>
> The php code is:
> $conn = sybase_pconnect("host","login","password");
> $ok=sybase_select_db("MYDB",$conn);
> $result=sybase_query("SELECT ReportType,ReportTypeName FROM
> [ListReportType]",$conn);
> $nbrows=sybase_num_rows($result);
> for($i=1;$i<=$nbrows;$i++)
> {
> $arr_row=sybase_fetch_array($result);
> echo("<a
> href=\"reportsindex.html?ss=type&vv=".trim($arr_row["ReportType"])."\">"
> );
> echo(trim($arr_row["ReportTypeName"])."</a><BR>");
> }
>
> What is happening?
>
> Franck Martin
> Network and Database Development Officer
> SOPAC South Pacific Applied Geoscience Commission
> Fiji
> E-mail: franck AT sopac.org <mailto:franck AT sopac.org>
> Web site: http://www.sopac.org/
> <http://www.sopac.org/> Support FMaps: http://fmaps.sourceforge.net/
> <http://fmaps.sourceforge.net/>
> Certificate: https://www.sopac.org/ssl/
>
> This e-mail is intended for its addresses only. Do not forward this
> e-mail without approval. The views expressed in this e-mail may not be
> necessarily the views of SOPAC.
>
>


---
You are currently subscribed to freetds as: [Franck AT sopac.org]
To unsubscribe, forward this message to
$subst('Email.Unsub')




Archive powered by MHonArc 2.6.24.

Top of Page