summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/ado/adoimp.cxx
diff options
context:
space:
mode:
authorOcke Janssen <oj@openoffice.org>2001-07-30 07:53:02 +0000
committerOcke Janssen <oj@openoffice.org>2001-07-30 07:53:02 +0000
commit503986990c7410000c336f934c911bdc4924d6fb (patch)
tree417ad1133fe68d9d5002b9686240fcc0eaa9f0ce /connectivity/source/drivers/ado/adoimp.cxx
parentc7f6878d5904ea16554b58b87b4636a9d4484577 (diff)
#90015# use ORowSetValue as const ref
Diffstat (limited to 'connectivity/source/drivers/ado/adoimp.cxx')
-rw-r--r--connectivity/source/drivers/ado/adoimp.cxx21
1 files changed, 18 insertions, 3 deletions
diff --git a/connectivity/source/drivers/ado/adoimp.cxx b/connectivity/source/drivers/ado/adoimp.cxx
index d6171cd87526..6fbafea60155 100644
--- a/connectivity/source/drivers/ado/adoimp.cxx
+++ b/connectivity/source/drivers/ado/adoimp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: adoimp.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: oj $ $Date: 2001-06-20 07:16:56 $
+ * last change: $Author: oj $ $Date: 2001-07-30 08:52:12 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -65,7 +65,9 @@
#ifndef _COM_SUN_STAR_SDBCX_PRIVILEGEOBJECT_HPP_
#include <com/sun/star/sdbcx/PrivilegeObject.hpp>
#endif
-
+#ifndef _DBHELPER_DBEXCEPTION_HXX_
+#include "connectivity/dbexception.hxx"
+#endif
#ifndef _CONNECTIVITY_ADO_AWRAPADO_HXX_
#include "ado/Awrapado.hxx"
#endif
@@ -348,6 +350,19 @@ sal_Int32 ADOS::mapRights2Ado(sal_Int32 nRights)
return eRights;
}
// -----------------------------------------------------------------------------
+WpADOField ADOS::getField(ADORecordset* _pRecordSet,sal_Int32 _nColumnIndex) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
+{
+ ADOFields* pFields = NULL;
+ _pRecordSet->get_Fields(&pFields);
+ WpOLEAppendCollection<ADOFields, ADOField, WpADOField> aFields(pFields); \
+ if(_nColumnIndex <= 0 || _nColumnIndex > aFields.GetItemCount())
+ ::dbtools::throwInvalidIndexException(NULL);
+ WpADOField aField(aFields.GetItem(_nColumnIndex-1));
+ if(!aField.IsValid())
+ ::dbtools::throwInvalidIndexException(NULL);
+ return aField;
+}
+// -----------------------------------------------------------------------------