Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
SingingBush committed Oct 26, 2023
1 parent fefab18 commit 1251d34
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ For many years odbc has been available in phobos under *etc.c.odbc* due to the [
- etc/c/odbc/sqltypes.d
- etc/c/odbc/sqlucode.d

Those modules are now deprecated (see [Mark etc.c.odbc as deprecated](https://github.com/dlang/phobos/commit/88fd21e7368e8e2158a6ac75d43587c77886d6dd)), and the functionality being moved to *core.sys.windows*. As this will cause issues in packages that need to use ODBC from non-windows environments I created this package to simply move the code as it was [prior to the change](https://github.com/dlang/phobos/tree/d548e8830aee86c024faf3279dd8d7e35d26aae8/etc/c/odbc), so that it can simply be used as a dub package. The imports are now:
Those modules are now deprecated (see [Mark etc.c.odbc as deprecated](https://github.com/dlang/phobos/commit/88fd21e7368e8e2158a6ac75d43587c77886d6dd)), and the functionality being moved to *core.sys.windows*. As this will cause issues in packages that need to use ODBC from non-windows environments, this package was created to simply move the code as it was [prior to the change](https://github.com/dlang/phobos/tree/d548e8830aee86c024faf3279dd8d7e35d26aae8/etc/c/odbc), so that it can simply be used as a dub package. The imports are now:

- odbc/sql.d
- odbc/sqlext.d
- odbc/sqltypes.d
- odbc/sqlucode.d

Note that the D code that was in `etc/c/odbc/*` supports ODBC v3. There is no current ODBC 4 implementation. ODBC 4.0 defines extensions to support non-relational concepts and would be a good future enhancement to make to this project.

## Installing a driver

You'll need to have an ODBC driver installed. For example to use SQL Server you can use _msodbcsql17_, _msodbcsql18_ or _FreeTDS_.
Expand Down Expand Up @@ -72,9 +74,9 @@ cd test/
Then run one of the following (depending on your driver version. Also note that _TrustServerCertificate_ may be required):

```
./odbctest "Driver={ODBC Driver 17 for SQL Server};Server=127.0.0.1,$PORT;Uid=sa;Pwd=bbk4k77JKH88g54;"
./odbctest "Driver={ODBC Driver 17 for SQL Server};Server=127.0.0.1,1433;Uid=sa;Pwd=bbk4k77JKH88g54;"
or
./odbctest "Driver={ODBC Driver 18 for SQL Server};Server=127.0.0.1,$PORT;Uid=sa;Pwd=bbk4k77JKH88g54;TrustServerCertificate=yes"
./odbctest "Driver={ODBC Driver 18 for SQL Server};Server=127.0.0.1,1433;Uid=sa;Pwd=bbk4k77JKH88g54;TrustServerCertificate=Yes"
```

0 comments on commit 1251d34

Please sign in to comment.