Skip to content

Commit

Permalink
test: Use ODBC driver 18 in Password test
Browse files Browse the repository at this point in the history
  • Loading branch information
pacman82 committed Jan 25, 2025
1 parent 132a5aa commit 541c135
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ You can install these requirements from here:

* Docker: <https://www.docker.com/get-started>
* Install Rust compiler and Cargo. Follow the instructions on [this site](https://www.rust-lang.org/en-US/install.html).
* [Microsoft ODBC Driver 17 for SQL Server](https://docs.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server?view=sql-server-ver15).
* [Microsoft ODBC Driver 18 for SQL Server](https://docs.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server?view=sql-server-ver15).
* An ODBC Driver manager if you are not on windows: <http://www.unixodbc.org/>
* There are many ways to setup Python on a system here is one: <https://www.python.org/downloads/>

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Fill Apache Arrow arrays from ODBC data sources. This package is build on top of
```python
from arrow_odbc import read_arrow_batches_from_odbc

connection_string="Driver={ODBC Driver 17 for SQL Server};Server=localhost;"
connection_string="Driver={ODBC Driver 18 for SQL Server};Server=localhost;TrustServerCertificate=yes;"

reader = read_arrow_batches_from_odbc(
query=f"SELECT * FROM MyTable WHERE a=?",
Expand Down
4 changes: 2 additions & 2 deletions python/arrow_odbc/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def more_results(
from arrow_odbc import read_arrow_batches_from_odbc
connection_string="Driver={ODBC Driver 17 for SQL Server};Server=localhost;"
connection_string="Driver={ODBC Driver 18 for SQL Server};Server=localhost;TrustServerCertificate=yes;"
reader = read_arrow_batches_from_odbc(
query=f"SELECT * FROM MyTable; SELECT * FROM OtherTable;",
connection_string=connection_string,
Expand Down Expand Up @@ -343,7 +343,7 @@ def read_arrow_batches_from_odbc(
from arrow_odbc import read_arrow_batches_from_odbc
connection_string="Driver={ODBC Driver 17 for SQL Server};Server=localhost;"
connection_string="Driver={ODBC Driver 18 for SQL Server};Server=localhost;TrustServerCertificate=yes;"
reader = read_arrow_batches_from_odbc(
query=f"SELECT * FROM MyTable WHERE a=?",
Expand Down
3 changes: 2 additions & 1 deletion tests/test_arrow_odbc.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,8 @@ def test_specify_user_and_password_separatly():
query = "SELECT 42 as a;"

# Connection string without credentials
connection_string = "Driver={ODBC Driver 17 for SQL Server};Server=localhost;"
connection_string = "Driver={ODBC Driver 18 for SQL Server};\
Server=localhost;TrustServerCertificate=yes;"
user = "SA"
password = "My@Test@Password1"

Expand Down

0 comments on commit 541c135

Please sign in to comment.