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 34e1fbf commit ecdff86Copy full SHA for ecdff86
README.md
@@ -47,16 +47,12 @@ Connect to SQL Server and execute a simple query:
47
import mssql_python
48
49
# Establish a connection
50
-connection = mssql_python.connect(
51
- server='your_server',
52
- database='your_database',
53
- username='your_username',
54
- password='your_password'
55
-)
+# Specify connection string
+connection = "SERVER=<your_server_name>;DATABASE=<your_database_name>;UID=<your_user_name>;PWD=<your_password>;Encrypt=yes;")
56
57
# Execute a query
58
cursor = connection.cursor()
59
-cursor.execute("SELECT * FROM your_table")
+cursor.execute("SELECT @@version")
60
rows = cursor.fetchall()
61
62
for row in rows:
0 commit comments