26#include <com/sun/star/lang/DisposedException.hpp>
46ODriver::ODriver(
const css::uno::Reference< css::uno::XComponentContext >& _xORB)
49 ,mnNbCallCoInitializeExForReinit(0)
72 ODriver_BASE::disposing();
78 return "com.sun.star.comp.sdbc.ado.ODriver";
83 return {
"com.sun.star.sdbc.Driver",
"com.sun.star.sdbcx.Driver" };
98 pCon->construct(url,info);
107 return url.startsWith(
"sdbc:ado:");
130 "IgnoreDriverPrivileges",
131 "Ignore the privileges from the database driver.",
138 "Escape date time format.",
145 "Defines how the type info of the database metadata should be manipulated.",
168 ::osl::MutexGuard aGuard(
m_aMutex );
169 if (ODriver_BASE::rBHelper.bDisposed)
170 throw DisposedException();
174 if (
auto pSearchConnection = comphelper::getFromUnoTunnel<OConnection>(xTunnel))
177 [&pSearchConnection](
const css::uno::WeakReferenceHelper& rxConnection) {
178 return static_cast<OConnection*>(Reference< XConnection >::query(rxConnection.get()).get()) == pSearchConnection; });
180 pConnection = pSearchConnection;
209 sal::systools::COMReference<ADOErrors> pErrors;
210 _pAdoCon->get_Errors(&pErrors);
216 pErrors->get_Count(&nLen);
219 SQLException aException;
220 aException.ErrorCode = 1000;
221 for (sal_Int32
i = nLen-1;
i>=0; --
i)
225 OSL_ENSURE(aErr,
"No error in collection found! BAD!");
234 aTemp.NextException <<= aException;
244extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
246 css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any>
const&)
248 return cppu::acquire(
new ODriver(context));
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * connectivity_ado_ODriver_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)
Reference< XComponentContext > m_xContext
helper class for accessing resources shared by different libraries in the connectivity module
OUString getResourceString(TranslateId pResId) const
loads a string from the shared resource file
static void ThrowException(ADOConnection *_pAdoCon, const css::uno::Reference< css::uno::XInterface > &_xInterface)
virtual void SAL_CALL setCatalog(const OUString &catalog) override
WpADOConnection & getConnection()
virtual sal_Int32 SAL_CALL getMajorVersion() override
virtual css::uno::Reference< css::sdbcx::XTablesSupplier > SAL_CALL getDataDefinitionByConnection(const css::uno::Reference< css::sdbc::XConnection > &connection) override
virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL connect(const OUString &url, const css::uno::Sequence< css::beans::PropertyValue > &info) override
virtual sal_Int32 SAL_CALL getMinorVersion() override
virtual css::uno::Sequence< css::sdbc::DriverPropertyInfo > SAL_CALL getPropertyInfo(const OUString &url, const css::uno::Sequence< css::beans::PropertyValue > &info) override
virtual OUString SAL_CALL getImplementationName() override
connectivity::OWeakRefArray m_xConnections
int mnNbCallCoInitializeExForReinit
virtual css::uno::Reference< css::sdbcx::XTablesSupplier > SAL_CALL getDataDefinitionByURL(const OUString &url, const css::uno::Sequence< css::beans::PropertyValue > &info) override
virtual void SAL_CALL disposing() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
void impl_checkURL_throw(const OUString &_sUrl)
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual sal_Bool SAL_CALL acceptsURL(const OUString &url) override
void putref_ActiveConnection(IDispatch *pCon)
OUString GetDescription() const
sal_Int32 GetNumber() const
OUString GetSQLState() const
::cppu::WeakComponentImplHelper< css::sdbc::XDriver, css::sdbcx::XDataDefinitionSupplier, css::lang::XServiceInfo > ODriver_BASE
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)