This commit is contained in:
Adam D. Ruppe 2011-11-28 20:04:51 -05:00
parent 2cb611ad53
commit 668dc2570d
1 changed files with 2 additions and 3 deletions

View File

@ -19,7 +19,7 @@ class MsSql : Database {
enforce(env !is null); enforce(env !is null);
scope(failure) scope(failure)
SQLFreeHandle(SQL_HANDLE_ENV, env); SQLFreeHandle(SQL_HANDLE_ENV, env);
SQLSetEnvAttr(env, SQL_ATTR_ODBC_VERSION, (void *) SQL_OV_ODBC3, 0); SQLSetEnvAttr(env, SQL_ATTR_ODBC_VERSION, cast(void *) SQL_OV_ODBC3, 0);
SQLAllocHandle(SQL_HANDLE_DBC, env, &conn); SQLAllocHandle(SQL_HANDLE_DBC, env, &conn);
scope(failure) scope(failure)
SQLFreeHandle(SQL_HANDLE_DBC, conn); SQLFreeHandle(SQL_HANDLE_DBC, conn);
@ -51,7 +51,7 @@ class MsSql : Database {
// this is passed to MsSqlResult to control // this is passed to MsSqlResult to control
SQLHSTMT statement; SQLHSTMT statement;
auto returned = SQLAllocHandle(SQL_HANDLE_STMT, conn, auto returned = SQLAllocHandle(SQL_HANDLE_STMT, conn,
&statement) &statement);
enforce(returned == SQL_SUCCESS); enforce(returned == SQL_SUCCESS);
@ -157,7 +157,6 @@ class MsSqlResult : ResultSet {
if(ptr) if(ptr)
goto more; goto more;
} }
}
row ~= a; row ~= a;
} }