in reply to Connect to remote MSSQL database with DBD-ODBC?
UPDATE: Ignore me. Getting confused between MySQL and MSSQL
UPDATE2: I am currently using a connection string in the following format to successfully connect to an instance of MSSQL on another machine - (using DBIx::Simple, but the connection mechanics are the same):
my $conn = 'driver={SQL Server};Server=SERVERNAME;Database=DBNAME;uid= +readonly;pwd=readonly'; my $db = DBIx::Simple->connect("dbi:ODBC:$conn") or die DBIx::Simple-> +error;
This is a DSN-less connection. The only major difference between my version and yours is the omission of " (32 Bit)" from the ODBC driver name. I vaguely remember that this harks back to the SQL 6.5 era, when there were 16- and 32-bit versions of the driver available.
To generalise, the connection string for DBD::ODBC should be the same as the connection string for any other Windows application. You can find helpful lists of connection strings for many database platforms (connection string types including ODBC, ADO, OLEDB etc.) at sites like this one.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Connect to remote MSSQL database with DBD-ODBC?
by FinnR (Novice) on Dec 14, 2005 at 14:41 UTC | |
by terce (Friar) on Dec 14, 2005 at 15:57 UTC | |
by FinnR (Novice) on Dec 14, 2005 at 18:54 UTC |