summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/jdbc/JConnection.cxx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2007-09-26 13:29:37 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2007-09-26 13:29:37 +0000
commit41f0ef4207e8c5f570a1fc09011bc60834d01b50 (patch)
tree031dad871a70dabd99d7bff1d1ac89d340540d3f /connectivity/source/drivers/jdbc/JConnection.cxx
parent39080065f7ac7f08363f3ddf7a32ee86afca8d6b (diff)
INTEGRATION: CWS dba24a (1.5.20); FILE MERGED
2007/08/22 05:54:18 fs 1.5.20.1: getWarnings: really provide an SQLWarning
Diffstat (limited to 'connectivity/source/drivers/jdbc/JConnection.cxx')
-rw-r--r--connectivity/source/drivers/jdbc/JConnection.cxx21
1 files changed, 16 insertions, 5 deletions
diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx b/connectivity/source/drivers/jdbc/JConnection.cxx
index d8a7178e084f..4da8d7e57c1e 100644
--- a/connectivity/source/drivers/jdbc/JConnection.cxx
+++ b/connectivity/source/drivers/jdbc/JConnection.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: JConnection.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: hr $ $Date: 2007-06-27 14:35:59 $
+ * last change: $Author: hr $ $Date: 2007-09-26 14:29:37 $
*
* 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 @@ Any SAL_CALL java_sql_Connection::getWarnings( ) throw(SQLException, RuntimeExc
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();