Perl

The Perl programming language

Testing DBI's DBDs

I've maintained DBD::ODBC for some years now but one thing that constantly causes me problems is finding enough testers to be sure a development release is good enough to be released officially. CPAN Testers do a great job (and I joined the clan for a while until the throttling issues last Xmas and now I wait for CPAN Testers 2) but very few (if any) have a data source set up to a real database. Mostly the reports I get are PASS but when I look at them there was no actually data source set up so no real database tests actually ran.

New 1.23_4 development release of DBD::ODBC - faster - please test

I have just uploaded a new development release of DBD::ODBC 1.23_4 to CPAN. This is very much an experimental release but unless I hear any negative reports I will release this as 1.24. If you use DBD::ODBC you SHOULD test this release as it contains some significant changes to speed up prepared statements and as DBD::ODBC has to support a large number of ODBC drivers I have not been able to test the dozens of possibilities myself. If you use the MS SQL Server ODBC Driver or Native Client this change will definitely impact you and for other drivers this should reduce calls to SQLBindParameter.

DBD::ODBC Speedups

In the last few days whilst hanging out on the #dbi IRC channel I saw messages from someone using/developing OTRS (Open source Ticket Request System) with DBD::ODBC.

#dbi channel on IRC

I know that not everyone is in to IRC and I for one have only flirted with it over the years but for the last 6 months or so I've frequented the #dbi channel and there are a number of knowledgeable and helpful people on it but there is a low representation from DBD authors/maintainers.

get_iplayer - download BBC iplayer content

Sometimes something comes along that truly impresses me. get_iplayer is one of those things. As a UK resident who uses iplayer three or four times a week and a Perl fan get_iplayer really caught my interest. The idea that you can list all of the BBCs iplayer content then download whatever you like to watch whenever you like really did interest me. First I tried downloading it from github but it failed to find updates. Then I noticed it was available as an Ubuntu package and installed it. After that a:
get_iplayer

DBIx::Log4perl release 0.20 - bugfix and new feature

I've just released v0.20 of DBIx::Log4perl. DBIx::Log4perl is a Perl extension for DBI to selectively log DBI methods, SQL, parameters, result-sets, transactions etc to a Log::Log4perl handle. This release fixes a problem where execute_array tuple status was reported at INFO level instead of DEBUG level and adds the DBIX_L4P_LOG_DELAYBINDPARAM constant which delays logging bind_param methods in DBI until the execute method is called.

Binding and retrieving NULL lobs from procedures

Just hit a rather annoying problem in DBD::Oracle 1.24a today. Our application contains all the logic in database procedures and in some cases database result-sets are returned to our Perl code via a reference cursor. Due to problems with ora_auto_lobs not working on reference cursors in previous DBD::Oracle releases we generally use Data Interface for Lob Locators where ora_lob_length returns a lobs sie and ora_lob_read is used to retrieve it.

Common problems calling procedures in MS SQL Server via DBD::ODBC

Recently I've had a spate of issues reported in dbi-users mailing list and direct to me wrt calling procedures in MS SQL Server. I thought it might be worth covering some of the more common ones here.

New 0.19 release of DBIx::Log4perl

Recently I updated DBIx::Log4perl to handle DBI's clone method. This proved a little troublesome as clone is marked as "likely to change" and I'm not sure any other DBIx's have added clone. The problem I had was that clone does not call connect and all the code I had to add DBIX::Log4perl's attributes into the dbh was in connect.

DBD::ODBC and date/time/datetime/timestamp

Over the last few months I've been receiving an increasing number of emails from people experiencing problems inserting date/time/datetime/timestamp values into MS SQL Server specifically although not exclusively. There are a number of MS SQL Server ODBC drivers but the ones I see the most (in no particular order) are a) MS SQL Server ODBC Driver b) MS SQL Server Native Client driver c) Easysoft's SQL Server ODBC Driver and d) freeTDS. I hope to write a more expansive tutorial on this in the near future but until then I hope this blog post will help.
Syndicate content