summaryrefslogtreecommitdiff
path: root/connectivity/source
diff options
context:
space:
mode:
authorOcke Janssen <oj@openoffice.org>2001-09-28 06:00:09 +0000
committerOcke Janssen <oj@openoffice.org>2001-09-28 06:00:09 +0000
commit72c1262aa32054b014997f2da4e5a264f6338eda (patch)
treea44cc15e0ffdecb8e65b438592193b03efae8344 /connectivity/source
parent4b68ecdae246060e9e10f27037276c9b40a70d53 (diff)
#92410# correct parameter names in sqlstmt and metadata corrected
Diffstat (limited to 'connectivity/source')
-rw-r--r--connectivity/source/drivers/ado/ADriver.cxx10
-rw-r--r--connectivity/source/drivers/ado/APreparedStatement.cxx51
-rw-r--r--connectivity/source/drivers/ado/Awrapado.cxx47
-rw-r--r--connectivity/source/inc/ado/AConnection.hxx7
-rw-r--r--connectivity/source/inc/ado/ADriver.hxx33
-rw-r--r--connectivity/source/inc/ado/APreparedStatement.hxx8
6 files changed, 106 insertions, 50 deletions
diff --git a/connectivity/source/drivers/ado/ADriver.cxx b/connectivity/source/drivers/ado/ADriver.cxx
index ca9a8e1554a3..f82a1d580f97 100644
--- a/connectivity/source/drivers/ado/ADriver.cxx
+++ b/connectivity/source/drivers/ado/ADriver.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ADriver.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: oj $ $Date: 2001-08-30 13:20:58 $
+ * last change: $Author: oj $ $Date: 2001-09-28 07:00:09 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -92,7 +92,9 @@ using namespace com::sun::star::lang;
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
-ODriver::ODriver() : ODriver_BASE(m_aMutex)
+ODriver::ODriver(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB)
+ : ODriver_BASE(m_aMutex)
+ ,m_xORB(_xORB)
{
CoInitialize(NULL);
}
@@ -134,7 +136,7 @@ Sequence< ::rtl::OUString > ODriver::getSupportedServiceNames_Static( ) throw (
//------------------------------------------------------------------
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL connectivity::ado::ODriver_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) throw( ::com::sun::star::uno::Exception )
{
- return *(new ODriver());
+ return *(new ODriver(_rxFactory));
}
// --------------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/ado/APreparedStatement.cxx b/connectivity/source/drivers/ado/APreparedStatement.cxx
index f174206a8dd8..051c3f4ea996 100644
--- a/connectivity/source/drivers/ado/APreparedStatement.cxx
+++ b/connectivity/source/drivers/ado/APreparedStatement.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: APreparedStatement.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: oj $ $Date: 2001-08-24 06:13:55 $
+ * last change: $Author: oj $ $Date: 2001-09-28 07:00:09 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -58,6 +58,10 @@
*
*
************************************************************************/
+
+#ifndef _CONNECTIVITY_SQLPARSE_HXX
+#include "connectivity/sqlparse.hxx"
+#endif
#ifndef _CONNECTIVITY_ADO_APREPAREDSTATEMENT_HXX_
#include "ado/APreparedStatement.hxx"
#endif
@@ -70,6 +74,9 @@
#ifndef _CONNECTIVITY_ADO_ARESULTSET_HXX_
#include "ado/AResultSet.hxx"
#endif
+#ifndef _CONNECTIVITY_ADO_ADRIVER_HXX_
+#include "ado/ADriver.hxx"
+#endif
#ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_
#include <com/sun/star/lang/DisposedException.hpp>
#endif
@@ -83,6 +90,7 @@
#include "connectivity/dbexception.hxx"
#endif
+
#define CHECK_RETURN(x) \
if(!x) \
ADOS::ThrowException(*m_pConnection->getConnection(),*this);
@@ -106,7 +114,22 @@ OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const OTypeInf
{
osl_incrementInterlockedCount( &m_refCount );
- CHECK_RETURN(m_Command.put_CommandText(sql))
+ OSQLParser aParser(_pConnection->getDriver()->getORB());
+ ::rtl::OUString sErrorMessage;
+ ::rtl::OUString sNewSql;
+ OSQLParseNode* pNode = aParser.parseTree(sErrorMessage,sql);
+ if(pNode)
+ { // special handling for parameters
+ // we recusive replace all occurences of ? in the statement and replace them with name like ""
+ sal_Int32 nParameterCount = 0;
+ ::rtl::OUString sDefaultName = ::rtl::OUString::createFromAscii("parame");
+ replaceParameterNodeName(pNode,sDefaultName,nParameterCount);
+ pNode->parseNodeToStr(sNewSql,_pConnection->getMetaData());
+ delete pNode;
+ }
+ else
+ sNewSql = sql;
+ CHECK_RETURN(m_Command.put_CommandText(sNewSql))
CHECK_RETURN(m_Command.put_Prepared(VARIANT_TRUE))
m_pParameters = m_Command.get_Parameters();
m_pParameters->AddRef();
@@ -474,6 +497,28 @@ void SAL_CALL OPreparedStatement::release() throw(::com::sun::star::uno::Runtime
OStatement_Base::release();
}
// -----------------------------------------------------------------------------
+void OPreparedStatement::replaceParameterNodeName(OSQLParseNode* _pNode,
+ const ::rtl::OUString& _sDefaultName,
+ sal_Int32& _rParameterCount)
+{
+ sal_Int32 nCount = _pNode->count();
+ for(sal_Int32 i=0;i < nCount;++i)
+ {
+ OSQLParseNode* pChildNode = _pNode->getChild(i);
+ if(SQL_ISRULE(pChildNode,parameter) && pChildNode->count() == 1)
+ {
+ OSQLParseNode* pNewNode = new OSQLParseNode(::rtl::OUString::createFromAscii(":") ,SQL_NODE_PUNCTUATION,0);
+ delete pChildNode->replace(pChildNode->getChild(0),pNewNode);
+ ::rtl::OUString sParameterName = _sDefaultName;
+ sParameterName += ::rtl::OUString::valueOf(++_rParameterCount);
+ pChildNode->append(new OSQLParseNode( sParameterName,SQL_NODE_NAME,0));
+ }
+ else
+ replaceParameterNodeName(pChildNode,_sDefaultName,_rParameterCount);
+
+ }
+}
+// -----------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/ado/Awrapado.cxx b/connectivity/source/drivers/ado/Awrapado.cxx
index fbc87929c4b4..360ce75db176 100644
--- a/connectivity/source/drivers/ado/Awrapado.cxx
+++ b/connectivity/source/drivers/ado/Awrapado.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: Awrapado.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: oj $ $Date: 2001-07-18 12:57:24 $
+ * last change: $Author: oj $ $Date: 2001-09-28 07:00:09 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1605,21 +1605,21 @@ ADORecordset* WpADOConnection::getExportedKeys( const ::com::sun::star::uno::Any
psa = SafeArrayCreate( VT_VARIANT, 1, rgsabound );
sal_Int32 nPos=0;
- hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_CATALOG
- hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_SCHEMA
- hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_NAME
-
if(catalog.hasValue())
varCriteria[nPos].setString(::comphelper::getString(catalog));
hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_CATALOG
- if(schema.toChar() != '%')
+ if(schema.getLength() && schema.toChar() != '%')
varCriteria[nPos].setString(schema);
hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_SCHEMA
varCriteria[nPos].setString(table);
hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_NAME
+ hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_CATALOG
+ hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_SCHEMA
+ hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_NAME
+
OLEVariant vtEmpty;
vtEmpty.setNoArg();
@@ -1629,7 +1629,6 @@ ADORecordset* WpADOConnection::getExportedKeys( const ::com::sun::star::uno::Any
ADORecordset *pRecordset = NULL;
OpenSchema(adSchemaForeignKeys,vsa,vtEmpty,&pRecordset);
-
return pRecordset;
}
// -----------------------------------------------------------------------------
@@ -1647,21 +1646,21 @@ ADORecordset* WpADOConnection::getImportedKeys( const ::com::sun::star::uno::Any
psa = SafeArrayCreate( VT_VARIANT, 1, rgsabound );
sal_Int32 nPos=0;
+ hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_CATALOG
+ hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_SCHEMA
+ hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_NAME
+
if(catalog.hasValue())
varCriteria[nPos].setString(::comphelper::getString(catalog));
hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_CATALOG
- if(schema.toChar() != '%')
+ if(schema.getLength() && schema.toChar() != '%')
varCriteria[nPos].setString(schema);
hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_SCHEMA
varCriteria[nPos].setString(table);
hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_NAME
- hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_CATALOG
- hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_SCHEMA
- hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_NAME
-
OLEVariant vtEmpty;
vtEmpty.setNoArg();
@@ -1671,7 +1670,9 @@ ADORecordset* WpADOConnection::getImportedKeys( const ::com::sun::star::uno::Any
ADORecordset *pRecordset = NULL;
OpenSchema(adSchemaForeignKeys,vsa,vtEmpty,&pRecordset);
+
return pRecordset;
+
}
// -----------------------------------------------------------------------------
ADORecordset* WpADOConnection::getPrimaryKeys( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table )
@@ -1692,7 +1693,7 @@ ADORecordset* WpADOConnection::getPrimaryKeys( const ::com::sun::star::uno::Any&
varCriteria[nPos].setString(::comphelper::getString(catalog));
hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_CATALOG
- if(schema.toChar() != '%')
+ if(schema.getLength() && schema.toChar() != '%')
varCriteria[nPos].setString(schema);
hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_SCHEMA
@@ -1733,7 +1734,7 @@ ADORecordset* WpADOConnection::getIndexInfo(
varCriteria[nPos].setString(::comphelper::getString(catalog));
hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_CATALOG
- if(schema.toChar() != '%')
+ if(schema.getLength() && schema.toChar() != '%')
varCriteria[nPos].setString(schema);
hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_SCHEMA
@@ -1776,7 +1777,7 @@ ADORecordset* WpADOConnection::getTablePrivileges( const ::com::sun::star::uno::
varCriteria[nPos].setString(::comphelper::getString(catalog));
hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_CATALOG
- if(schemaPattern.toChar() != '%')
+ if(schemaPattern.getLength() && schemaPattern.toChar() != '%')
varCriteria[nPos].setString(schemaPattern);
hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_SCHEMA
@@ -1823,7 +1824,7 @@ ADORecordset* WpADOConnection::getCrossReference( const ::com::sun::star::uno::A
varCriteria[nPos].setString(::comphelper::getString(primaryCatalog));
hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_CATALOG
- if(primarySchema.toChar() != '%')
+ if(primarySchema.getLength() && primarySchema.toChar() != '%')
varCriteria[nPos].setString(primarySchema);
hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_SCHEMA
@@ -1834,7 +1835,7 @@ ADORecordset* WpADOConnection::getCrossReference( const ::com::sun::star::uno::A
varCriteria[nPos].setString(::comphelper::getString(foreignCatalog));
hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_CATALOG
- if(foreignSchema.toChar() != '%')
+ if(foreignSchema.getLength() && foreignSchema.toChar() != '%')
varCriteria[nPos].setString(foreignSchema);
hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_SCHEMA
@@ -1873,7 +1874,7 @@ ADORecordset* WpADOConnection::getProcedures( const ::com::sun::star::uno::Any&
varCriteria[nPos].setString(::comphelper::getString(catalog));
hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_CATALOG
- if(schemaPattern.toChar() != '%')
+ if(schemaPattern.getLength() && schemaPattern.toChar() != '%')
varCriteria[nPos].setString(schemaPattern);
hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_SCHEMA
@@ -1915,7 +1916,7 @@ ADORecordset* WpADOConnection::getProcedureColumns( const ::com::sun::star::uno:
varCriteria[nPos].setString(::comphelper::getString(catalog));
hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_CATALOG
- if(schemaPattern.toChar() != '%')
+ if(schemaPattern.getLength() && schemaPattern.toChar() != '%')
varCriteria[nPos].setString(schemaPattern);
hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_SCHEMA
@@ -1961,7 +1962,7 @@ ADORecordset* WpADOConnection::getTables( const ::com::sun::star::uno::Any& cata
varCriteria[nPos].setString(::comphelper::getString(catalog));
hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_CATALOG
- if(schemaPattern.toChar() != '%')
+ if(schemaPattern.getLength() && schemaPattern.toChar() != '%')
varCriteria[nPos].setString(schemaPattern);
hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_SCHEMA
@@ -2016,7 +2017,7 @@ ADORecordset* WpADOConnection::getColumns( const ::com::sun::star::uno::Any& cat
varCriteria[nPos].setString(::comphelper::getString(catalog));
hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_CATALOG
- if(schemaPattern.toChar() != '%')
+ if(schemaPattern.getLength() && schemaPattern.toChar() != '%')
varCriteria[nPos].setString(schemaPattern);
hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_SCHEMA
@@ -2061,7 +2062,7 @@ ADORecordset* WpADOConnection::getColumnPrivileges( const ::com::sun::star::uno:
varCriteria[nPos].setString(::comphelper::getString(catalog));
hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_CATALOG
- if(schema.toChar() != '%')
+ if(schema.getLength() && schema.toChar() != '%')
varCriteria[nPos].setString(schema);
hr = SafeArrayPutElement(psa,&nPos,&varCriteria[nPos]);nPos++;// TABLE_SCHEMA
diff --git a/connectivity/source/inc/ado/AConnection.hxx b/connectivity/source/inc/ado/AConnection.hxx
index e8a44a079182..d91940e55cd0 100644
--- a/connectivity/source/inc/ado/AConnection.hxx
+++ b/connectivity/source/inc/ado/AConnection.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: AConnection.hxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: oj $ $Date: 2001-08-30 13:20:58 $
+ * last change: $Author: oj $ $Date: 2001-09-28 07:00:08 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -172,7 +172,8 @@ namespace connectivity
void setCatalog(const ::com::sun::star::uno::WeakReference< ::com::sun::star::sdbcx::XTablesSupplier>& _xCat) { m_xCatalog = _xCat; }
const OTypeInfoMap* getTypeInfo() const { return &m_aTypeInfo;}
- sal_Int32 getEngineType() const { return m_nEngineType; }
+ sal_Int32 getEngineType() const { return m_nEngineType; }
+ ODriver* getDriver() const { return m_pDriver; }
};
}
}
diff --git a/connectivity/source/inc/ado/ADriver.hxx b/connectivity/source/inc/ado/ADriver.hxx
index 4b6470b6a8be..9791917772c9 100644
--- a/connectivity/source/inc/ado/ADriver.hxx
+++ b/connectivity/source/inc/ado/ADriver.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ADriver.hxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 16:14:24 $
+ * last change: $Author: oj $ $Date: 2001-09-28 07:00:08 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -96,33 +96,36 @@ namespace connectivity
connectivity::OWeakRefArray m_xConnections; // vector containing a list
// of all the Connection objects
// for this Driver
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB;
public:
- ODriver();
+ ODriver(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB);
~ODriver();
// OComponentHelper
virtual void SAL_CALL disposing(void);
// XInterface
- static ::rtl::OUString getImplementationName_Static( ) throw(::com::sun::star::uno::RuntimeException);
- static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static( ) throw (::com::sun::star::uno::RuntimeException);
+ static ::rtl::OUString getImplementationName_Static( ) throw(::com::sun::star::uno::RuntimeException);
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static( ) throw (::com::sun::star::uno::RuntimeException);
// XServiceInfo
- virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
// XDriver
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > SAL_CALL connect( const ::rtl::OUString& url, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL acceptsURL( const ::rtl::OUString& url ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sdbc::DriverPropertyInfo > SAL_CALL getPropertyInfo( const ::rtl::OUString& url, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getMajorVersion( ) throw(::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getMinorVersion( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > SAL_CALL connect( const ::rtl::OUString& url, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL acceptsURL( const ::rtl::OUString& url ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sdbc::DriverPropertyInfo > SAL_CALL getPropertyInfo( const ::rtl::OUString& url, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getMajorVersion( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getMinorVersion( ) throw(::com::sun::star::uno::RuntimeException);
// XDataDefinitionSupplier
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier > SAL_CALL getDataDefinitionByConnection( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& connection ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier > SAL_CALL getDataDefinitionByURL( const ::rtl::OUString& url, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier > SAL_CALL getDataDefinitionByConnection( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& connection ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XTablesSupplier > SAL_CALL getDataDefinitionByURL( const ::rtl::OUString& url, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getORB() const { return m_xORB; }
};
}
diff --git a/connectivity/source/inc/ado/APreparedStatement.hxx b/connectivity/source/inc/ado/APreparedStatement.hxx
index 833e1a900d12..517599c07dba 100644
--- a/connectivity/source/inc/ado/APreparedStatement.hxx
+++ b/connectivity/source/inc/ado/APreparedStatement.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: APreparedStatement.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: oj $ $Date: 2001-04-30 10:09:04 $
+ * last change: $Author: oj $ $Date: 2001-09-28 07:00:08 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -89,6 +89,7 @@
namespace connectivity
{
+ class OSQLParseNode;
namespace ado
{
@@ -102,6 +103,9 @@ namespace connectivity
{
void setParameter(sal_Int32 parameterIndex, const DataTypeEnum& _eType,const sal_Int32& _nSize,const OLEVariant& _Val)
throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ void replaceParameterNodeName( OSQLParseNode* _pNode,
+ const ::rtl::OUString& _sDefaultName,
+ sal_Int32& _nParameterCount);
protected:
//====================================================================
// Data attributes