atom feed7 messages in org.perl.dbi-users"max" datatypes support of SQL Server...
FromSent OnAttachments
Fumiaki YoshimatsuMar 13, 2006 6:44 pm 
Steve SapovitsAug 21, 2006 6:27 am 
mich...@bnpparibas.comAug 21, 2006 6:30 am 
Steve SapovitsAug 21, 2006 6:38 am 
mich...@bnpparibas.comAug 21, 2006 6:51 am 
Steve SapovitsAug 21, 2006 7:01 am 
Steve SapovitsAug 21, 2006 7:00 pm 
Subject:"max" datatypes support of SQL Server 2005 for DBD-ODBC
From:Fumiaki Yoshimatsu (fumi@gmail.com)
Date:Mar 13, 2006 6:44:08 pm
List:org.perl.dbi-users

Hi all,

I had a need to support [n]varchar(max) and varbinary(max) datatypes of MS SQL Server 2005, and patched DBD-ODBC. Below is the diff from the current svn.

Thanks, Fumiaki Yoshimatsu

Index: C:/DBD-ODBC/dbdimp.c =================================================================== --- C:/DBD-ODBC/dbdimp.c (revision 3682) +++ C:/DBD-ODBC/dbdimp.c (working copy) @@ -1761,7 +1761,6 @@ /* patch to allow binary types 3/24/99 courtesy of Jon * Smirl */ - case SQL_VARBINARY: case SQL_BINARY: fbh->ftype = SQL_C_BINARY; break; @@ -1782,6 +1781,14 @@ fbh->ColDisplaySize = sizeof(TIMESTAMP_STRUCT); break; #endif + case SQL_VARBINARY: + fbh->ftype = SQL_C_BINARY; + case SQL_VARCHAR: + case SQL_WVARCHAR: + if (fbh->ColDef == 0) { + fbh->ColDisplaySize = DBIc_LongReadLen(imp_sth); + } + break; }

/* make sure alignment is accounted for on all types, including