Skip to Content.
Sympa Menu

freetds - Re: [freetds] string problem about freeTDS

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddy77 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] string problem about freeTDS
  • Date: Mon, 13 Sep 2010 16:20:34 +0200

2010/9/6 Difei Qi <fredericqi AT gmail.com>

> hello,
> I met a strange problem as following:
>
> I have a table with a nvarchar(20), or text TYPE, just like
> create table ttext
> (
> data nvarchar(20)
> --or data text
> )
>
> insert into ttext values(NULL);
>
> and then I use freeTDS to get the data out, it give me the value *X* and
> the
> lengh of the value is *3*
> *but the real value is NULL ,how could this happen?*
> *
> *
> *And the more stranger things is, when I create a view as following:*
> *
> *
> *
> CREATE VIEW vw_ttext
> AS
> SELECT ISNULL(data,'') AS data FROM ttext
>
> there is no space between '',and then I get the value using the view:
>
> select data from vw_ttext
>
> and the freeTDS cord dump with the error message:
>
> sqlapi: dblib.c:626: dbgetnull: Assertion `!"unknown bindtype"' failed.
> /bin/sh: line 1: 17573 Aborted (core dumped) ./sqlapi 1
> Press Enter to continue!
>
> not only due to the view, if one column of the real table has the value
> just like '', freeTDS will core dump as well.
> I don't know what cause this happen?
>
> there exists a lot of columns which data may be just '' and I don't want to
> check whether it is in this condition, can you help me? My version is 0.82,
> and I have tried your new 0.82.patch, the problem still exists.
> Many thanks!
>
> *
>

Could you post FreeTDS dump ??

freddy77




Archive powered by MHonArc 2.6.24.

Top of Page