http://www.perlmonks.org?node_id=319867


in reply to Can I set the DSN for an ODBC connection?

There appears to be

This from the the docs for DBD::ODBC

use DBI; $dbh = DBI->connect('dbi:ODBC:DSN', 'user', 'password');

Replies are listed 'Best First'.
Re: Re: Can I set the DSN for an ODBC connection?
by Itatsumaki (Friar) on Jan 08, 2004 at 19:17 UTC

    I read the question to be asking for a way to actually create a DSN for an ODBC driver. I don't think that can be done via DBI at all. On the other hand, the syntax you gave is correct for accessing an ODBC source via DBI, which might be what was wanted. I'm not really clear what the OP is asking.

    -Tats
      ah...good point.

      I dug around and it seems that Win32::ODBC supports a ConfigDSN method to add a new DSN but I have no way to test such an animal in my working environ.