rt48304

New rt for DBD::ODBC at DBD::ODBC - [Microsoft][SQL Server Native Client 10.0][SQL Server]The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. The SQL Server native client driver has proved to be a bit buggy and this /may/ be another one - we'll have to wait and see. DBD::ODBC already has a number of workarounds for issues in the MS SQL Server ODBC Driver and Native Client Driver.

Comments

Further progress with rt48304

It looks like the problem is similar to the workaround for one of the differences the MS Native Client Driver exhibits.
   /*
    * Yet another workaround for SQL Server native client.
    * If you have a varbinary(max) or varchar(max) you have to pass 0
    * for the column_size or you get HY104 "Invalid precision value".
    * See rt_38977.t which causes this.
    * The versions of native client I've seen this with are:
    * 2007.100.1600.22 sqlncli10.dll driver version = ?
    * 2005.90.1399.00 SQLNCLI.DLL driver version = 09.00.1399
    */
The following diff might work but the reporter is having loads of new issues with building DBD::ODBC in ActiveState Perl:
===================================================================
--- dbdimp.c    (revision 13148)
+++ dbdimp.c    (working copy)
@@ -3422,11 +3422,14 @@
     * 2007.100.1600.22 sqlncli10.dll driver version = ?
     * 2005.90.1399.00 SQLNCLI.DLL driver version = 09.00.1399
     */
-   if ((imp_dbh->driver_type == DT_SQL_SERVER_NATIVE_CLIENT) &&
-       (phs->strlen_or_ind < 0) &&
+   if ((imp_dbh->driver_type != DT_SQL_SERVER_NATIVE_CLIENT) &&
+       /*(phs->strlen_or_ind < 0) &&*/
        (phs->param_size == 0)) {
        column_size = 0;
    }
If anyone out there is knowledgeable about ActiveState and building C modules with MinGW I'd love to know why the reporter of this issue is getting the following problems running "cpan test ." once MinGW was installed: Can't find string terminator "@" anywhere before EOF at -e line 1. dmake: Error code 255, while making 'ODBC.bs'

rt48304 fixed in DBD::ODBC 1.22_3

rt48304 fixed in DBD::ODBC 1.22_3 uploaded to CPAN around 20-Aug-09.