Easysoft ODBC-ODBC Bridge

Why do tests 1, 2 and 6 of 20Sqlserver test in DBD::ODBC fail to MS SQL Server?

Article:
00992
Last Reviewed:
27th November 2008
Revision:
2

Symptom

You are doing a make test in DBD::ODBC and tests 1, 2 and 6 of the 20Sqlserver test fail like this:

t/20SqlServer....NOK 1Please upgrade your ODBC drivers to the latest
SQL Server drivers available.
t/20SqlServer....FAILED tests 1-2, 6
        Failed 3/25 tests, 88.00% okay

If you run the test again with TEST_VERBOSE=1 the relevant failues are:

t/20SqlServer....1..25
Inserting: 0, string length 13
Inserting: 1, 2001-01-01 01:01:01.110 string length 12
Inserting: 2, 2002-02-02 02:02:02.123 string length 114
Inserting: 3, 2003-03-03 03:03:03.333 string length 251
Inserting: 4, 2004-04-04 04:04:04.443 string length 282
Inserting: 5, 2005-05-05 05:05:05.557 string length 131
Retrieving: 0, string length 13
Retrieving: 1, 2001-01-01 01:01:00.000 string length 12 !time
Retrieving: 2, 2002-02-02 02:02:02.123 string length 114
Retrieving: 3, 2003-03-03 03:03:03.333 string length 251
Retrieving: 4, 2004-04-04 04:04:04.443 string length 282
Retrieving: 5, 2005-05-05 05:05:05.557 string length 131
not ok 1
f ne foo
Please upgrade your ODBC drivers to the latest SQL Server drivers available.
not ok 2
1
2
3
ok 3
CREATE PROCEDURE PERL_DBD_PROC1 (@i int, @result int OUTPUT)
AS BEGIN     SET @result = @i+1;END
ok 4
ok 5
2002-07-12 05:09:00.000
not ok 6

Here you will note that test 1 and 6 fails because the datetime inserted is not retrieved correctly (the seconds and milliseconds are zeroed) and test 2 fails because the string "foo" that was inserted is retrieved as "f". We have identified this problem as a bug in the MS SQL Server driver. If you go to the ODBC Administrator on your server machine and click on drivers the version of your SQL Server driver is likely to be 2000.80.194.00 (if it is not please let us know).

Solution

The solution is to upgrade your SQL Server ODBC driver. The version in MDAC 2.7 appears to work OK. Version 2000.81.9030.04 of the SQL Server ODBC driver is also OK.

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.