https://github.com/billgraziano/mssqlodbc
GO helper library for MSSQL ODBC connections
https://github.com/billgraziano/mssqlodbc
go golang mssql odbc sqlserver
Last synced: 6 months ago
JSON representation
GO helper library for MSSQL ODBC connections
- Host: GitHub
- URL: https://github.com/billgraziano/mssqlodbc
- Owner: billgraziano
- License: mit
- Created: 2017-04-15T22:53:56.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-06-25T13:47:21.000Z (about 3 years ago)
- Last Synced: 2025-01-29T04:43:14.206Z (over 1 year ago)
- Topics: go, golang, mssql, odbc, sqlserver
- Language: Go
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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