New 1.32_2 development release of Perl DBD::ODBC

I have just uploaded 1.32_2 development release of DBD::ODBC. This contains one rather nice enhancement for Windows users which adds the new odbc_driver_complete attribute described as below. This allows DBD::ODBC on Windows to obtain a window handle which means if the ODBC Driver Manager or ODBC Driver needs to throw a dialogue to complete the data source or perhaps re-enter an expired password it can. Any testing will be greatly appreciated. The full changes since 1.31 are:

Changes in DBD::ODBC 1.32_2 October 22 2011

    1. Added new odbc_driver_complete attribute allowing the ODBC Driver Manager and ODBC Driver to throw dialogues for incomplete connection strings or expired passwords etc.
    1. added more examples
    1. new FAQ entries

Changes in DBD::ODBC 1.32_1 June 24 2011

    1. I omitted rt_68720.t from the 1.31 distribution which leads to a warning as it is mentioned in the MANIFEST.
    1. Changed line endings in and README.unicode to be unix line endings and native eol-style in subversion.
    2. Minor changes to Makefile.PL to save the opensuse guys patching.
    3. Added and examples


This attribute was added to DBD::ODBC in 1.32_2.

odbc_driver_complete is only relevant to the Windows operating system and will be ignored on other platforms. It is off by default.

When set to a true value DBD::ODBC attempts to obtain a window handle and calls SQLDriverConnect with the SQL_DRIVER_COMPLETE attribute instead of the normal SQL_DRIVER_NOPROMPT option. What this means is that if the connection string does not describe sufficient attributes to enable the ODBC driver manager to connect to a data source it will throw a dialogue allowing you to input the remaining attributes. Once you ok that dialogue the ODBC Driver Manager will continue as if you specified those attributes in the connection string. Once the connection is complete you may want to look at the odbc_out_connect_string attribute to obtain a connection string you can use in the future to pass into the connect method without prompting.

As a window handle is passed to SQLDriverConnect it also means the ODBC driver may throw a dialogue e.g., if your password has expired the MS SQL Server driver will often prompt for a new one.

An example is:

  my $h = DBI->connect('dbi:ODBC:DRIVER={SQL Server}', "username", "password",
                       {odbc_driver_complete => 1});

As this only provides the driver and further attributes are required a dialogue will be thrown allowing you to specify the SQL Server to connect to and possibly other attributes.


Installing here at Mitsi!

All of us are installing it on our development machines now, so if there are any major issues we'll let you know.