Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/billgraziano/mssqlodbc

GO helper library for MSSQL ODBC connections
https://github.com/billgraziano/mssqlodbc

go golang mssql odbc sqlserver

Last synced: 21 days ago
JSON representation

GO helper library for MSSQL ODBC connections

Awesome Lists containing this project

README

        

# mssqlodbc
A simple helper library for GO MSSQL ODBC connections. This has been tested with
https://github.com/alexbrainman/odbc

```go
cxn := Connection{
Server: "localhost\\SQL2014",
Database: "tempdb",
AppName: "gosql",
Trusted: true,
MultiSubnetFailover: true,
}

s, err := cxn.ConnectionString()
if err != nil {
return err
}

db, err := sql.Open("odbc", s)
if err != nil {
return err
}
defer db.Close()
```

Includes the following features:
* List the valid drivers installed
* Select the "best" driver based on my subjective ranking of them
* Parse a SQL Server ODBC connection string into a Connection

Includes support for:
* The generic SQL Server ODBC driver
* The SQL Server ODBC Driver v11, v13, v17, v18
* The SQL Server Native Client ODBC driver v10 and v11