Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/billgraziano/mssqlodbc
- Owner: billgraziano
- License: mit
- Created: 2017-04-15T22:53:56.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-06-25T13:47:21.000Z (over 1 year ago)
- Last Synced: 2024-10-15T16:21:52.906Z (2 months 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 ConnectionIncludes 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