Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitecdff86

Browse files
authored
Update README.md
1 parent34e1fbf commitecdff86

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

‎README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,12 @@ Connect to SQL Server and execute a simple query:
4747
import mssql_python
4848

4949
# 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-
)
50+
# Specify connection string
51+
connection="SERVER=<your_server_name>;DATABASE=<your_database_name>;UID=<your_user_name>;PWD=<your_password>;Encrypt=yes;")
5652

5753
# Execute a query
5854
cursor= connection.cursor()
59-
cursor.execute("SELECT* FROM your_table")
55+
cursor.execute("SELECT@@version")
6056
rows= cursor.fetchall()
6157

6258
for rowin rows:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp