Re: Problem with Set TEXT field to NULL
Frediano Ziglio <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
2009/2/12 Min <[email protected]>: > Hello, > > Thanks for the confirm and the patch. But this is related to the TEXT > fields. So I add the following to the token.c. It seems working for me. But > not sure if it break any else. Can some one confirm if it is OK? > > --- freetds-0.82/src/tds/token.c 2008-01-27 10:41:23.000000000 +0000 > +++ patch/src/tds/token.c 2009-02-12 16:11:40.000000000 +0000 > @@ -1946,6 +1946,8 @@ > tds_get_n(tds, blob->textptr, 16); > tds_get_n(tds, blob->timestamp, 8); > colsize = tds_get_int(tds); > + if (colsize == 0) > + colsize = -1; > } else { > colsize = -1; > } > > > Min > > 2009/2/12 Teemu Torma <[email protected]> > >> On Wednesday 11 February 2009 05:12:40 James K. Lowden wrote: >> > Anyone got a patch? I'm not going to be able to look into this for a few >> > weeks. >> >> Does this patch help? I just yesterday updated to 0.82 and noticed that >> long >> varchar columns (> 255) do not receive null status. The attached appears >> to >> fix this. >> >> Teemu >> Applied Teemu Torma patch for long varchar. Min patch break empty TEXT fields under mssql. mssql supports empty TEXT as ''. Sybase save empty strings as a single characters (' '). I tried to insert an empty text using Sybase 15 and db save NULLs as no having textptr/timestamp so token.c code is ok. freddy77 _______________________________________________ FreeTDS mailing list [email protected] http://lists.ibiblio.org/mailman/listinfo/freetds