Subject: | DBI::SQL_DATETIME - Invalid data type (SQL-HY004) |
Date: | Sun, 11 Mar 2012 17:30:07 -0400 |
To: | "bug-DBD-ODBC [...] rt.cpan.org" <bug-DBD-ODBC [...] rt.cpan.org> |
From: | "Bower, Wayne (Wayne)" <Wayne.Bower [...] lsi.com> |
While testing our code with DBD::ODBC 1.33 I found a case that is failing.
The 1st attachment (test_sql_types.pl) is the script that demonstrates the problem.
And the 2nd attachment (test_sql_types.log) is from
DBI_TRACE=15=test_sql_types_dbi.log ./test_sql_types.pl >test_sql_types.log 2>&1
And the 3rd attachment (test_sql_types_dbi.log) is the DBI_TRACE output.
This is using perl 5.14.1, DBI 1.616, DBD::ODBC 1.33 with freeTDS 0.91 and unixODBC on Linux.
The script creates a procedure with input parameters of different types and executes it resulting in the following error:
DBD::ODBC::st bind_param failed: [FreeTDS][SQL Server]Invalid data type (SQL-HY004)
If I specify DBI::SQL_DATETIME as the type it fails with this error, but if I change the type to DBI::SQL_TIMESTAMP it works. It also works if I do not specify the type. In fact we have changed to not specifying the type because this seems to work well for any parameter type.
I'm not sure if you would consider this a bug or if I overlooked something in the documentation about the SQL_DATETIME data type.
Thank you,
Wayne Bower
Message body is not shown because sender requested not to inline it.
Message body not shown because it is not plain text.
Message body not shown because it is not plain text.