Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 644 Bytes

File metadata and controls

37 lines (27 loc) · 644 Bytes

快速开始

最小可运行示例

import dmPython

conn = dmPython.connect(
    user="SYSDBA",
    password="SYSDBA001",
    server="localhost",
    port=5236,
)

cur = conn.cursor()
cur.execute("SELECT 1")
print(cur.fetchone())

cur.close()
conn.close()

使用上下文管理器

import dmPython

with dmPython.connect(user="SYSDBA", password="SYSDBA001", server="localhost", port=5236) as conn:
    with conn.cursor() as cur:
        cur.execute("SELECT SYSTIMESTAMP")
        print(cur.fetchone())

下一步