summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/jdbc/JDriver.cxx
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2003-05-22 09:50:18 +0000
committerVladimir Glazounov <vg@openoffice.org>2003-05-22 09:50:18 +0000
commit4126e9392434e25129e08eda835b87685b778195 (patch)
tree3596aeb752f0bef0e82e1e3e16f24b93068b55ab /connectivity/source/drivers/jdbc/JDriver.cxx
parent70152fce04b0e754b207a08bbaa8e212b64c47f3 (diff)
INTEGRATION: CWS dba06 (1.28.6); FILE MERGED
2003/05/13 09:59:11 oj 1.28.6.1: #109478# change return type of construct member function
Diffstat (limited to 'connectivity/source/drivers/jdbc/JDriver.cxx')
-rw-r--r--connectivity/source/drivers/jdbc/JDriver.cxx15
1 files changed, 10 insertions, 5 deletions
diff --git a/connectivity/source/drivers/jdbc/JDriver.cxx b/connectivity/source/drivers/jdbc/JDriver.cxx
index c359d5dc3a..1f0f5845f9 100644
--- a/connectivity/source/drivers/jdbc/JDriver.cxx
+++ b/connectivity/source/drivers/jdbc/JDriver.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: JDriver.cxx,v $
*
- * $Revision: 1.28 $
+ * $Revision: 1.29 $
*
- * last change: $Author: rt $ $Date: 2003-04-25 16:04:07 $
+ * last change: $Author: vg $ $Date: 2003-05-22 10:50:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -148,9 +148,14 @@ Sequence< ::rtl::OUString > SAL_CALL java_sql_Driver::getSupportedServiceNames(
Reference< XConnection > SAL_CALL java_sql_Driver::connect( const ::rtl::OUString& url, const
Sequence< PropertyValue >& info ) throw(SQLException, RuntimeException)
{
- java_sql_Connection* pConnection = new java_sql_Connection(this );
- Reference< XConnection > xOut = pConnection;
- pConnection->construct(url,info);
+ Reference< XConnection > xOut;
+ if ( acceptsURL(url ) )
+ {
+ java_sql_Connection* pConnection = new java_sql_Connection(this );
+ xOut = pConnection;
+ if ( !pConnection->construct(url,info) )
+ xOut = NULL; // an error occured and the java driver doesn't throw an exception
+ }
return xOut;
}
// -------------------------------------------------------------------------