in reply to DBI connection

The usual question is: can you connect to this same database via other tools? The dsn is correctly setted and working? The documentation is your friend always: DBI, DBD::ODBC.

And please add code tags to make your question more legible.