diff options
author | Ocke Janssen <oj@openoffice.org> | 2001-04-12 11:33:30 +0000 |
---|---|---|
committer | Ocke Janssen <oj@openoffice.org> | 2001-04-12 11:33:30 +0000 |
commit | e1022adee0a2708964c75094d17e7da406fccff0 (patch) | |
tree | 2d6c495509b59312f6876acf1cb15258c3b96d59 /connectivity/source/drivers/ado/AViews.cxx | |
parent | ed7319d1ea41a09797c285ff19f99ce30ae0ef2f (diff) |
correct access to bstr and variant
Diffstat (limited to 'connectivity/source/drivers/ado/AViews.cxx')
-rw-r--r-- | connectivity/source/drivers/ado/AViews.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/connectivity/source/drivers/ado/AViews.cxx b/connectivity/source/drivers/ado/AViews.cxx index b97c68c0aff7..b6b4ae4ee3b3 100644 --- a/connectivity/source/drivers/ado/AViews.cxx +++ b/connectivity/source/drivers/ado/AViews.cxx @@ -2,9 +2,9 @@ * * $RCSfile: AViews.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: oj $ $Date: 2001-03-30 14:07:20 $ + * last change: $Author: oj $ $Date: 2001-04-12 12:31:30 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -128,7 +128,10 @@ void SAL_CALL OViews::appendByDescriptor( const Reference< XPropertySet >& descr if(xTunnel.is()) { OAdoView* pView = (OAdoView*)xTunnel->getSomething(OAdoView:: getUnoTunnelImplementationId()); - m_pCollection->Append((BSTR)getString(descriptor->getPropertyValue(PROPERTY_NAME)).getStr(),(IDispatch *)pView->getImpl()); + if(pView) + m_pCollection->Append(OLEString(getString(descriptor->getPropertyValue(PROPERTY_NAME))),(IDispatch *)pView->getImpl()); + else + throw SQLException(::rtl::OUString::createFromAscii("Could not append view!"),*this,SQLSTATE_GENERAL,1000,Any()); } OCollection_TYPE::appendByDescriptor(descriptor); |