We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1a743d8 commit a113930Copy full SHA for a113930
_mssql.pyx
@@ -460,7 +460,7 @@ cdef class MSSQLConnection:
460
461
login = dblogin()
462
if login == NULL:
463
- raise MSSQLDriverException("Out of memory")
+ raise MSSQLDriverException("dblogin() failed")
464
465
appname = appname or "pymssql"
466
@@ -1745,10 +1745,8 @@ def set_max_connections(int limit):
1745
dbsetmaxprocs(limit)
1746
1747
cdef void init_mssql():
1748
- cdef RETCODE rtc
1749
- rtc = dbinit()
1750
- if rtc == FAIL:
1751
- raise MSSQLDriverException("Could not initialize communication layer")
+ if dbinit() == FAIL:
+ raise MSSQLDriverException("dbinit() failed")
1752
1753
dberrhandle(err_handler)
1754
dbmsghandle(msg_handler)
0 commit comments