Today someone posted a problem using the SQL Server XML datatype with DBI/DBD::ODBC on the dbi-users mailing list. I sorted their problem pretty quickly but noticed his code using length() on scalars which were bound with bound_col was not reporting the correct length. The example and output are below:
A great deal of issues arise in the dbi-users mailing list and to me personally concerning ODBC connection issues so I thought I'd describe the ODBC connection process here (with a slight Perl angle since I look after DBD::ODBC). The information here should be of general interest to anyone using ODBC.