freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] Are LOBs supported? Two additional bytes are fetched for text column.
- From: Frediano Ziglio <freddy77 AT gmail.com>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] Are LOBs supported? Two additional bytes are fetched for text column.
- Date: Thu, 10 Jan 2008 07:46:47 +0100
Il giorno mer, 09/01/2008 alle 11.11 +0100, Sebastien FLAESCH ha
scritto:
> Hello,
>
> Here is a new version of the odbctest17.c sample...
>
> Now the program uses SQL_LEN_DATA_AT_EXEC() macro for SQLBindParameter().
>
> But still uses SQL_DATA_AT_EXEC for SQLBindCol() (I suppose this is
> supported).
>
> I think there is a problem when fetching text data:
>
> By inserting 10000 bytes, then fetching, I get 2 additional bytes for the
> text column.
>
> I checked the values inserted in the database with:
>
> select datalength(t), datalength(b) from tt
>
> returns:
>
> 0 10000 10000
> 1 10000 10000
>
> So to me the insert is ok.
>
> Try the following:
>
> ./odbctest17.bin dsn user pswd 2
>
> where 2 is the number of rows to be inserted.
>
> Output gives:
>
> >> insert... 0
> >> SQLParamData: ptr = 0xbff4b990 rcode = 99
> >> param 0xbff4b990: total bytes written = 10000
> >> SQLParamData: ptr = 0xbff4b990 rcode = 99
> >> param 0xbff4b990: total bytes written = 10000
> >> SQLParamData: ptr = 0xbff4b990 rcode = 0
> >> insert... 1
> >> SQLParamData: ptr = 0xbff4b990 rcode = 99
> >> param 0xbff4b990: total bytes written = 10000
> >> SQLParamData: ptr = 0xbff4b990 rcode = 99
> >> param 0xbff4b990: total bytes written = 10000
> >> SQLParamData: ptr = 0xbff4b990 rcode = 0
> >> fetch... 0 rcode = 0
> >> readBlob field 1
> >> step 1: 4096 bytes read...
> >> step 2: 4096 bytes read...
> >> step 3: 1810 bytes read...
> >> total bytes read = 10002 <--- should be 10000
> >> readBlob field 2
I'll fix this problem is that it consider numm-termination cause source
is longvarchar while it should consider destination (witch is
SQL_C_BINARY)
freddy77
-
[freetds] Are LOBs supported?
, (continued)
- [freetds] Are LOBs supported?, Sebastien FLAESCH, 01/08/2008
- Re: [freetds] Are LOBs supported?, ZIGLIO, Frediano, VF-IT, 01/08/2008
- Re: [freetds] Are LOBs supported?, ZIGLIO, Frediano, VF-IT, 01/08/2008
- Re: [freetds] Are LOBs supported?, Sebastien FLAESCH, 01/08/2008
- Re: [freetds] Are LOBs supported?, Sebastien FLAESCH, 01/08/2008
- Re: [freetds] Are LOBs supported?, ZIGLIO, Frediano, VF-IT, 01/08/2008
- Re: [freetds] Are LOBs supported?, Sebastien FLAESCH, 01/08/2008
- Re: [freetds] Are LOBs supported?, Sebastien FLAESCH, 01/08/2008
- Re: [freetds] Are LOBs supported?, Sebastien FLAESCH, 01/09/2008
- Re: [freetds] Are LOBs supported? Two additional bytes are fetched for text column., Sebastien FLAESCH, 01/09/2008
- Re: [freetds] Are LOBs supported? Two additional bytes are fetched for text column., Frediano Ziglio, 01/10/2008
- Re: [freetds] Are LOBs supported? Two additional bytes arefetched for text column., ZIGLIO, Frediano, VF-IT, 01/10/2008
- Re: [freetds] Are LOBs supported? Two additional bytes arefetched for text column., Sebastien FLAESCH, 01/10/2008
- Re: [freetds] Are LOBs supported? Two additional bytes arefetched for text column., ZIGLIO, Frediano, VF-IT, 01/10/2008
- [freetds] SQLCancel() and error diagnostic: Expecting HY008 SQLSTATE, Sebastien FLAESCH, 01/09/2008
- Re: [freetds] SQLCancel() and error diagnostic: Expecting HY008 SQLSTATE, ZIGLIO, Frediano, VF-IT, 01/10/2008
- Re: [freetds] SQLCancel() and error diagnostic: Expecting HY008 SQLSTATE, Frediano Ziglio, 01/13/2008
- Re: [freetds] SQLCancel() and error diagnostic: Expecting HY008 SQLSTATE, James K. Lowden, 01/14/2008
- Re: [freetds] SQLCancel() and error diagnostic: Expecting HY008 SQLSTATE, Sebastien FLAESCH, 01/14/2008
- Re: [freetds] SQLCancel() and error diagnostic: Expecting HY008 SQLSTATE, Sebastien FLAESCH, 01/14/2008
- Re: [freetds] SQLCancel() and error diagnostic: Expecting HY008 SQLSTATE, James K. Lowden, 01/14/2008
Archive powered by MHonArc 2.6.24.