diff --git a/mssql.d b/mssql.d index 34d57c3..589f9cf 100644 --- a/mssql.d +++ b/mssql.d @@ -60,7 +60,7 @@ class MsSql : Database { returned = SQLExecDirect(statement, cast(ubyte*)sql.ptr, SQL_NTS); if(returned != SQL_SUCCESS) - throw new DatabaseException(error()); + throw new DatabaseException(getSQLError(SQL_HANDLE_STMT, statement)) return new MsSqlResult(statement); }