Re: Plan to support newer MS SQL Server types

Frediano Ziglio <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <1271710805.4864.6.camel@freddy>
Il giorno lun, 19/04/2010 alle 12.04 -0400, [email protected] ha
scritto:
> On Mon, Apr 19, 2010 at 06:48:59PM +0200, Frediano Ziglio wrote:
> > Il giorno lun, 19/04/2010 alle 09.57 -0400, [email protected] ha
> > scritto:
> > > ??  For db-lib connections, the server converts varchar(max) to TEXT (type 35).  Then the db-lib API can deal with it either by binding it as a string or with dbmoretext().  
> > 
> > Yes, this is true with MS dblib cause MS dblib use only protocol 4.2. We
> > support protocol up to 7.1 under dblib :)
> 
> Hi Freddy, 
> 
> bsqldb works perfectly well with varchar(max):
> 
> $ TDSVER=8.0 bsql -v -S server <<< "select cast('hello' as varchar(max)) as greeting" 
> bsqldb:161: Verbose operation enabled
> bsqldb:210: Query:
>         select cast('hello' as varchar(max)) as greeting
> bsqldb:184: dbsqlsend(): OK
> bsqldb:192: dbsqlok(): OK
> bsqldb:287: calling dbresults: OK
> Result set 1
> Freeing prior allocations
> Allocating buffers
> Allocating compute buffers
> Metadata
> col     name                            source                          type             size    varies  
> ------  ------------------------------  ------------------------------  ---------------  ------  ------  
>      1                        greeting                        greeting             text    4096       1  
> 
> Data
> hello   
> Retrieving output parameters... none
> bsqldb:624: dbresults() returned NO_MORE_RESULTS (2):
> 

Yes, cause you are using protocol 7.1 which does not support
varchar(max) so this type is returned as text :)
Protocol 7.2 support varchar(max) with different byte encoding.

> > In 0.82 libTDS does not support variant replacing it with NULLs... CVS
> > version store and manage data. Yes, your have to bound to specific data
> > in order to fetch but is supported 
> 
> Unfortunately that support was not added in tds_willconvert.pl.  Otherwise it looks like the work you did in tds_convert would flow through to db-lib.  
> 

ops.... you know... I'm just a man! One things to pay attention is also
how you pass data to tds_convert...

> > I think most requested are MARS and SQL 2008 types.
> 
> Just a small matter of programming.  
> 

Also time and food
http://i.telegraph.co.uk/telegraph/multimedia/archive/01415/mars_1415709c.jpg

:)

freddy77
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.