in reply to dbi faq updates

I saw this and thought I'd fire off a couple of answers to questions that have stumped me in the past. Hopefully if more people can post tips then the FAQ can be better for everyone. Here's my contribution here in case it's handy.

Why does selectall_hashref now fail (changed in 1.20):
change $hr = $dbh->selectall_hashref($sql, {}, @bind) to $hr = $dbh->selectall_arrayref($sql, {Slice=>{}}, @bind)

Why does getting values from the CGI.pm param function not work as expected when I insert them into the database?
CGI.pm returns an empty parameter as an empty string '' so you need to make sure you undef them first!

How do I use a DSN-less connection with DBD::ODBC?
Look up the exact name of the driver in ODBC manager for example for Access it is "Access Driver (*.mdb)" and use this string as the DSN:
$dsn = "driver=$driver;dbq=$path_to_db"; $dbh = DBI->connect("dbi:ODBC:$dsn");

gav^