Skip to Content.
Sympa Menu

freetds - RE: sp_help problem

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Barke Erik <erik.barke AT ur.se>
  • To: 'TDS Development Group' <freetds AT franklin.oit.unc.edu>
  • Subject: RE: sp_help problem
  • Date: Wed, 29 Dec 1999 19:09:22 +0100


Hi!

We're connecting Solaris 2.6/DBD:Sybase/FreeTds (tdsver 4.2) and Ms Sql
7/NT4.
I've also encountered the "Uknown marker etc" error message;
however not when using sp_help. When trying to use sp_help I get
the first few lines back and then nothing happens. When snooping
the Sql server I can see all the data getting passed to the Solaris box
but it never seems to reach my Perl script.

The "Uknown marker etc" error message shows up when the
Sql server is returning fields containing NULL.
It seems to me some fields containing NULL are impossible to
retrieve using Sybase/Freetds.
The workaround for me was using ISNULL; Ms Sql server
replaces the NULL value with any character[s] you choose.
This way DBD:Sybase/FreeTds never have to handle NULL.

SELECT ISNULL(some_field, 'your_replacement_here')
FROM some_table

(To tell you the truth, I'm actually retreiving fields containing NULL
without using
ISNULL, beats me why it sometimes works and sometimes not...)

Cheers :-)

Erik

> Is it a known problem that sp_help <tablename> doesn't return all the
> information sent back by the server when using freetds (5.0)? If TDSVER
> is set to 70 the first few pieces of information (table name, owner,
> type, creation date) come back and then many lines of unknown markers;
> here's some examples:
>
> Unknown marker: 231!!
> Unknown marker: 0!!
> Unknown marker: 1!!
> Unknown marker: 10!!
> Unknown marker: 105!!
> Unknown marker: 0!!
> Unknown marker: 110!!
> Unknown marker: 0!!
> Unknown marker: 100!!
> Unknown marker: 0!!
> Unknown marker: 101!!
> Unknown marker: 0!!
> Unknown marker: 120!!
> Unknown marker: 0!!
> Unknown marker: 95!!
> Unknown marker: 0!!
> Unknown marker: 110!!
> Unknown marker: 0!!
> Unknown marker: 97!!
> Unknown marker: 0!!
> [... continues on line this for quite a few lines ...]
>
> If TDSVER is set to 42 the same first few pieces of information come
> back, followed by some blank lines. The real output for sp_help
> <tablename> includes lots more information, such as column information,
> indexes, constraints, etc. sp_help is a stored procedure which (I
> assume) executes multiple queries in MS SQL (7.0 in this case), and I'm
> guessing that freetds (or maybe DBD::Sybase, which I'm using over it)
> doesn't yet know what to do with a multiple result-set stored procedure.
> Is this a reasonable guess? And if so, any idea if such support is in
> the works?
>
> Thanks!
>
> Bob Kline
>
>
> ---
> You are currently subscribed to freetds as: erik.barke AT ur.se
> To unsubscribe, forward this message to
> $subst('Email.Unsub')



  • sp_help problem, Bob Kline, 12/29/1999
    • <Possible follow-up(s)>
    • RE: sp_help problem, Barke Erik, 12/29/1999

Archive powered by MHonArc 2.6.24.

Top of Page