# Driver from the FreeTDS package # Setup from the unixODBC package [FreeTDS] Description = ODBC for FreeTDS Driver = /usr/lib/cygtdsodbc.dll Setup = /usr/lib/cygtdsodbc.dll FileUsage = 1 #### my $dsn = 'dbi:ODBC:DRIVER={FreeTDS};'; $dsn .= 'SERVER=DB.EXAMPLE.COM;database=NorthWind;'; $dsn .= 'port=1433;tds_version=8.0;'; my $dbh = DBI->connect($dsn, 'username', 'password', { PrintError => 0, # don't automatically print out error messages RaiseError => 1, # die on error AutoCommit => 1, # automatically committed when executed LongReadLen => 24*1024, # SQL Server limit LongTruncOk => 1, # don't die when we grab really long data :/ odbc_utf8_on => 1, # utf8 all data. We'll need to decode everything });