diff --git a/lib/impure/db_odbc.nim b/lib/impure/db_odbc.nim index 8aadfae732..3568cf1cc3 100644 --- a/lib/impure/db_odbc.nim +++ b/lib/impure/db_odbc.nim @@ -508,7 +508,7 @@ proc open*(connection, user, password, database: string): DbConn {. if res != SQL_SUCCESS: dbError("Error: unable to initialise ODBC environment.") res = SQLSetEnvAttr(result.env, SQL_ATTR_ODBC_VERSION.TSqlInteger, - cast[SqlPointer](val.addr), resLen.TSqlInteger) + cast[SqlPointer](val), resLen.TSqlInteger) if res != SQL_SUCCESS: dbError("Error: unable to set ODBC driver version.") # allocate hDb handle res = SQLAllocHandle(SQL_HANDLE_DBC, result.env, result.hDb)