Kaydet (Commit) f4c082f9 authored tarafından Frank Schönheit's avatar Frank Schönheit

some more error error prone now ...

üst 20852bf3
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: genericcontroller.cxx,v $ * $RCSfile: genericcontroller.cxx,v $
* *
* $Revision: 1.3 $ * $Revision: 1.4 $
* *
* last change: $Author: oj $ $Date: 2001-01-23 10:35:13 $ * last change: $Author: fs $ $Date: 2001-01-26 14:15:24 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -796,16 +796,25 @@ sal_Bool SAL_CALL OGenericUnoController::supportsService(const ::rtl::OUString& ...@@ -796,16 +796,25 @@ sal_Bool SAL_CALL OGenericUnoController::supportsService(const ::rtl::OUString&
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
Reference<XConnection> OGenericUnoController::connect(const ::rtl::OUString& _rsDataSourceName) Reference<XConnection> OGenericUnoController::connect(const ::rtl::OUString& _rsDataSourceName)
{ {
Reference<XConnection> xConnection;
Any aValue; Any aValue;
try try
{ {
aValue = m_xDatabaseContext->getByName(_rsDataSourceName); aValue = m_xDatabaseContext->getByName(_rsDataSourceName);
} }
catch(Exception&) catch(Exception&)
{ } {
}
Reference<XPropertySet> xProp; Reference<XPropertySet> xProp;
aValue >>= xProp; aValue >>= xProp;
if (!xProp.is())
{
DBG_ERROR("OGenericUnoController::connect: coult not retrieve the data source!");
return xConnection;
}
::rtl::OUString sPwd, sUser; ::rtl::OUString sPwd, sUser;
sal_Bool bPwdReq = sal_False; sal_Bool bPwdReq = sal_False;
try try
...@@ -819,7 +828,6 @@ Reference<XConnection> OGenericUnoController::connect(const ::rtl::OUString& _rs ...@@ -819,7 +828,6 @@ Reference<XConnection> OGenericUnoController::connect(const ::rtl::OUString& _rs
DBG_ERROR("SbaTableQueryBrowser::OnExpandEntry: error while retrieving data source properties!"); DBG_ERROR("SbaTableQueryBrowser::OnExpandEntry: error while retrieving data source properties!");
} }
Reference<XConnection> xConnection; // supports the service sdb::connection
SQLExceptionInfo aInfo; SQLExceptionInfo aInfo;
try try
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment