Skip to Content.
Sympa Menu

freetds - Re: [freetds] Plan to support newer MS SQL Server types

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: jklowden AT schemamania.org
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Plan to support newer MS SQL Server types
  • Date: Mon, 19 Apr 2010 12:04:47 -0400

On Mon, Apr 19, 2010 at 06:48:59PM +0200, Frediano Ziglio wrote:
> Il giorno lun, 19/04/2010 alle 09.57 -0400, jklowden AT schemamania.org 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):

> 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.

> I think most requested are MARS and SQL 2008 types.

Just a small matter of programming.

Regards,

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page