Easysoft Data Access

Why does make test in DBD::ODBC to SQL Server 2005 and SQL Server Express fail?

Article:
00956
Last Reviewed:
23rd April 2009
Revision:
2

This applies to DBD::ODBC 1.14 (and earlier versions). It may apply to versions of DBD::ODBC later than 1.14 is our patch for the fix is not implemented by the maintainer (see the DBD::ODBC changes file).

SQL Server 2005 and SQL Server Express have changed the way:

dbcc TRACESTATUS(-1)

works. This affects tests 28, 31, 32 and 33 in the 20SqlServer module.

The errors look like:

t/20SqlServer....ok 4/37
#   Failed test 'dbcc messages being returned'
t/20SqlServer....NOK 28#   in t/20SqlServer.t at line 443.
#     '0'
#         >
#     '0'
t/20SqlServer....ok 29/37Describe failed during DBI::st=HASH(0x9d65010)->FETCH(o
dbc_more_results,0) at t/20SqlServer.t line 453.

#   Failed test 'ensure 2 error messages from two print statements'
#   in t/20SqlServer.t at line 459.
#          got: '3'
#     expected: '2'
t/20SqlServer....NOK 31
#   Failed test 'validate error messages being retrieved'
#   in t/20SqlServer.t at line 460.
#          got: 'Connection is busy with results for another hstmt'
#     expected: 'END'
t/20SqlServer....NOK 32
#   Failed test 'Multiple concurrent statements should fail'
#   in t/20SqlServer.t at line 471.
DBI::db=HASH(0x9d1f1cc)->disconnect invalidates 1 active statement handle (eithe
r destroy statement handles or call finish on them before disconnecting) at t/20
SqlServer.t line 473.
t/20SqlServer....ok 36/37# Looks like you planned 37 tests but only ran 36.
# Looks like you failed 4 tests of 36 run.
t/20SqlServer....dubious
        Test returned status 4 (wstat 1024, 0x400)
DIED. FAILED tests 28, 31-33, 37
        Failed 5/37 tests, 86.49% okay

You can ignore these failures as they are an error in the test rather than a bug in DBD::ODBC itself. Alternatively you can follow the instructions below to correct the problem.

Edit the file t/20SqlServer, search for:

$sth = $dbh->prepare("dbcc TRACESTATUS(-1)");

and change it to:

$sth = $dbh->prepare("dbcc TRACESTATUS(0)");
Applies To

Knowledge Base Feedback

* Did this content help you?
* Please select one option based on your first choice:

(* Required Fields)


Oracle is a registered trademark of Oracle Corporation and/or its affiliates.