Tag: cws_src680_mdbdriver02 User: fs Date: 06/05/05 00:42:00 Modified: /dba/connectivity/source/drivers/mdb/ mdb_wrapper.cxx
Log: mdb_sql_reset followed by mdb_sql_exit, to fully clean up all resources File Changes: Directory: /dba/connectivity/source/drivers/mdb/ ================================================ File [changed]: mdb_wrapper.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mdb/mdb_wrapper.cxx?r1=1.1.4.4&r2=1.1.4.5 Delta lines: +27 -18 --------------------- --- mdb_wrapper.cxx 5 May 2006 07:11:53 -0000 1.1.4.4 +++ mdb_wrapper.cxx 5 May 2006 07:41:58 -0000 1.1.4.5 @@ -4,9 +4,9 @@ * * $RCSfile: mdb_wrapper.cxx,v $ * - * $Revision: 1.1.4.4 $ + * $Revision: 1.1.4.5 $ * - * last change: $Author: fs $ $Date: 2006/05/05 07:11:53 $ + * last change: $Author: fs $ $Date: 2006/05/05 07:41:58 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -92,10 +92,12 @@ if (!(mdb = mdb_open (sFileName,MDB_NOFLAGS))) { fprintf(stderr,"Couldn't open database.\n"); } + OSL_TRACE( "opening %s, handle %X", sFileName, (int)mdb ); return mdb; } void CloseMDB(::MdbHandle * mdb) { + OSL_TRACE( "closing %X", (int)mdb ); mdb_close(mdb); mdb_exit(); } @@ -319,13 +321,17 @@ char * pTempSqlStr=strdup(aSqlStr.getStr()); if (!mdb_sql_run_query(sql,pTempSqlStr)) { + mdb_sql_reset( sql ); + // compared with mdb_sql_exit, this seems to do one additional cleanup (see mdbsql.c) + sql->mdb = NULL; + mdb_sql_exit( sql ); return sal_False; } free(pTempSqlStr); -int j; -MdbSQLColumn *sqlcol; -unsigned long row_count = 0; + int j; + MdbSQLColumn *sqlcol; + unsigned long row_count = 0; Sequence< OUString > seq( sql->num_columns ); @@ -351,7 +357,10 @@ //fprintf(stdout,"\n"); aRows.push_back(row); } - mdb_sql_reset(sql); + mdb_sql_reset( sql ); + // compared with mdb_sql_exit, this seems to do one additional cleanup (see mdbsql.c) + sql->mdb = NULL; + mdb_sql_exit( sql ); return sal_True; } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
