Tag: cws_src680_hsql1808 User: fs Date: 2007-07-30 07:22:09+0000 Modified: dba/connectivity/source/drivers/jdbc/JConnection.cxx
Log: getWarning should return a warning, not an error File Changes: Directory: /dba/connectivity/source/drivers/jdbc/ ================================================= File [changed]: JConnection.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/jdbc/JConnection.cxx?r1=1.5&r2=1.5.14.1 Delta lines: +17 -6 -------------------- --- JConnection.cxx 2007-06-27 14:35:59+0000 1.5 +++ JConnection.cxx 2007-07-30 07:22:06+0000 1.5.14.1 @@ -4,9 +4,9 @@ * * $RCSfile: JConnection.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.5.14.1 $ * - * last change: $Author: hr $ $Date: 2007/06/27 14:35:59 $ + * last change: $Author: fs $ $Date: 2007/07/30 07:22:06 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -63,6 +63,9 @@ #ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_ #include <com/sun/star/lang/DisposedException.hpp> #endif +#ifndef _COM_SUN_STAR_SDBC_SQLWARNING_HPP_ +#include <com/sun/star/sdbc/SQLWarning.hpp> +#endif #ifndef _CONNECTIVITY_SQLPARSE_HXX #include "connectivity/sqlparse.hxx" #endif @@ -797,9 +800,17 @@ if( out ) { java_sql_SQLWarning_BASE warn_base(t.pEnv, out); - return makeAny( - static_cast< starsdbc::SQLException >( - java_sql_SQLWarning(warn_base,*this))); + SQLException aAsException( static_cast< starsdbc::SQLException >( java_sql_SQLWarning( warn_base, *this ) ) ); + + // translate to warning + SQLWarning aWarning; + aWarning.Context = aAsException.Context; + aWarning.Message = aAsException.Message; + aWarning.SQLState = aAsException.SQLState; + aWarning.ErrorCode = aAsException.ErrorCode; + aWarning.NextException = aAsException.NextException; + + return makeAny( aWarning ); } return Any(); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
