summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/ado/AUsers.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/drivers/ado/AUsers.cxx')
-rw-r--r--connectivity/source/drivers/ado/AUsers.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/connectivity/source/drivers/ado/AUsers.cxx b/connectivity/source/drivers/ado/AUsers.cxx
index 9d0dab6e8d4c..4b050d239237 100644
--- a/connectivity/source/drivers/ado/AUsers.cxx
+++ b/connectivity/source/drivers/ado/AUsers.cxx
@@ -27,6 +27,7 @@
#include <comphelper/servicehelper.hxx>
#include <comphelper/types.hxx>
#include <connectivity/dbexception.hxx>
+#include <systools/win32/oleauto.hxx>
#include <strings.hrc>
using namespace comphelper;
@@ -56,12 +57,12 @@ Reference< XPropertySet > OUsers::createDescriptor()
// XAppend
sdbcx::ObjectType OUsers::appendObject( const OUString& _rForName, const Reference< XPropertySet >& descriptor )
{
- OUserExtend* pUser = getFromUnoTunnel<OUserExtend>( descriptor );
+ OUserExtend* pUser = dynamic_cast<OUserExtend*>( descriptor.get() );
if ( pUser == nullptr )
m_pCatalog->getConnection()->throwGenericSQLException( STR_INVALID_USER_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) );
ADOUsers* pUsers = m_aCollection;
- pUsers->Append(OLEVariant(pUser->getImpl()),OLEString(pUser->getPassword()).asBSTR());
+ pUsers->Append(OLEVariant(pUser->getImpl()), sal::systools::BStr(pUser->getPassword()));
return createObject( _rForName );
}