Re: DBI::SQL_DATETIME - Invalid data type (SQL-HY004)

"Martin J. Evans" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Organization Easysoft Limited
Message-ID <[email protected]>
On 18/03/12 21:13, Bower, Wayne (Wayne) wrote:
> I attached a test case showing a failure to recognize the DBI::SQL_DATETIME type using perl 5.14.1, DBI 1.616, DBD::ODBC 1.33 with freeTDS 0.91 and unixODBC on Linux.
>
> 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.
>
> 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.
>
> The DBD::ODBC developer already reviewed this and believes the issue to be with FreeTDS if it is one.

That is not exactly what I said:

https://rt.cpan.org/Ticket/Display.html?id=75699

I actually pointed out it happens with the MS SQL Server ODBC driver too.

Martin
-- 
Martin J. Evans
Easysoft Limited
http://www.easysoft.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.