- or download this
$ENV{DBI_DSN} = 'dbi:ODBC:SQL Server';
$ENV{DBI_USER} = 'JohnSmith';
$ENV{DBI_PASS}='Hello';
- or download this
------------
>odbcinst --version
...
>odbcinst -q -d
[SQL Server]
[PostgreSQL]
- or download this
----------------------- Paste code example 1
#!/usr/bin/perl -w
...
my $DSN = 'driver={SQL Server};Server=Server05;database=Payroll;uid=Jo
+hnSmith;'
my $dbh = DBI->connect("dbi:ODBC:$DSN") or die "$DBI::errstr\n";
---------------------- End Paste code example 1
- or download this
---------------------- Paste error message example 1
DBI connect('driver={SQL Server};Server=Fridge;database=Payroll;uid=Jo
+hnSmith;','',...) failed: [unixODBC][Driver Manager]Data source name
+not found, and no default driver specified (SQL-IM002) at a1.pl line
+9
[unixODBC][Driver Manager]Data source name not found, and no default d
+river specified (SQL-IM002)
---------------------- End Paste error message example 1
- or download this
----------------------- Paste code example 2
#!/usr/bin/perl -w
...
my $DSN = 'driver={SQL Server};Server=10.0.0.53:1433;Database=Payroll;
+Uid=JohnSmith;Pwd=Hello;';
my $dbh = DBI->connect("dbi:ODBC:$DSN") or die ($DBI::errstr . "\n");
---------------------- End Paste code example 2
- or download this
---------------------- Paste error message example 2
DBI connect('driver={SQL Server};Server=10.0.0.53:1433;Database=Payrol
+l;Uid=JohnSmith;Pwd=Hello;','',...) failed: [unixODBC][Driver Manager
+]Data source name not found, and no default driver specified (SQL-IM0
+02) at aa.pl line 6
[unixODBC][Driver Manager]Data source name not found, and no default d
+river specified (SQL-IM002)
---------------------- Paste error message example 2