Skip to Content.
Sympa Menu

freetds - [freetds] DBI::SQL_DATETIME - Invalid data type (SQL-HY004)

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Bower, Wayne (Wayne)" <Wayne.Bower AT lsi.com>
  • To: "FreeTDS AT lists.ibiblio.org" <FreeTDS AT lists.ibiblio.org>
  • Subject: [freetds] DBI::SQL_DATETIME - Invalid data type (SQL-HY004)
  • Date: Sun, 18 Mar 2012 17:13:38 -0400

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.

Thank you,
Wayne Bower

Attachment: test_sql_types.pl
Description: test_sql_types.pl

Attachment: test_sql_types.log
Description: test_sql_types.log

Attachment: test_sql_types_dbi.log
Description: test_sql_types_dbi.log




Archive powered by MHonArc 2.6.24.

Top of Page