We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc60afc commit 84f68e5Copy full SHA for 84f68e5
README.md
@@ -47,12 +47,16 @@ Connect to SQL Server and execute a simple query:
47
import mssql_python
48
49
# Establish a connection
50
-# Specify connection string
51
-connection = "SERVER=<your_server_name>;DATABASE=<your_database_name>;UID=<your_user_name>;PWD=<your_password>;Encrypt=yes;")
+connection = mssql_python.connect(
+ server='your_server',
52
+ database='your_database',
53
+ username='your_username',
54
+ password='your_password'
55
+)
56
57
# Execute a query
58
cursor = connection.cursor()
-cursor.execute("SELECT @@version")
59
+cursor.execute("SELECT * FROM your_table")
60
rows = cursor.fetchall()
61
62
for row in rows:
0 commit comments