Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2024 02:14 AM
Hi,
We switched to using the pymssql library.
Incomplete code sample to give you an idea:
import pymssql
# strParamList is comma separated list of @Param="some value"
sqlExecuteStoredProc = f"exec {strStoredProcName} {strParamList}"
_MetaDBConnection = pymssql.connect(_MetaDBServerName, _MetaDBUserName, _MetaDBPassword, _MetaDBDatabaseName)
cursor = _MetaDBConnection.cursor(as_dict=True)
cursor.execute(sqlExecuteStoredProc)
_MetaDBConnection.commit()
_MetaDBConnection.close()