string problem about freeTDS
Difei Qi <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
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!
*