Tag: cws_src680_kaddrbook
User: ebischoff
Date: 05/09/02 01:44:24

Modified:
 /dba/connectivity/source/drivers/kab/
  KDatabaseMetaData.cxx

Log:
 Fixes

File Changes:

Directory: /dba/connectivity/source/drivers/kab/
================================================

File [changed]: KDatabaseMetaData.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/kab/KDatabaseMetaData.cxx?r1=1.1.2.2&r2=1.1.2.3
Delta lines:  +18 -4
--------------------
--- KDatabaseMetaData.cxx       2 Sep 2005 05:07:18 -0000       1.1.2.2
+++ KDatabaseMetaData.cxx       2 Sep 2005 08:44:22 -0000       1.1.2.3
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: KDatabaseMetaData.cxx,v $
  *
- *  $Revision: 1.1.2.2 $
+ *  $Revision: 1.1.2.3 $
  *
- *  last change: $Author: ebischoff $ $Date: 2005/09/02 05:07:18 $
+ *  last change: $Author: ebischoff $ $Date: 2005/09/02 08:44:22 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -72,6 +72,9 @@
 #ifndef _COM_SUN_STAR_SDBC_COLUMNVALUE_HPP_
 #include <com/sun/star/sdbc/ColumnValue.hpp>
 #endif
+#ifndef _COM_SUN_STAR_SDBC_RESULTSETTYPE_HPP_
+#include <com/sun/star/sdbc/ResultSetType.hpp>
+#endif
 #ifndef _COM_SUN_STAR_SDBC_TRANSACTIONISOLATION_HPP_
 #include <com/sun/star/sdbc/TransactionIsolation.hpp>
 #endif
@@ -175,7 +178,9 @@
 // -------------------------------------------------------------------------
 sal_Int32 SAL_CALL KabDatabaseMetaData::getMaxTablesInSelect(  ) 
throw(SQLException, RuntimeException)
 {
-       sal_Int32 nValue = 0; // 0 means no limit
+       // MaxTablesInSelect describes how many tables can participate in the 
FROM part of a given SELECT statement,
+       // currently, the resultset/statement implementations can cope with one 
table only
+       sal_Int32 nValue = 1;
        return nValue;
 }
 // -------------------------------------------------------------------------
@@ -421,7 +426,8 @@
 // -------------------------------------------------------------------------
 sal_Bool SAL_CALL KabDatabaseMetaData::isReadOnly(  ) throw(SQLException, 
RuntimeException)
 {
-       return sal_False;
+       // for the moment, we have read-only addresses, but this might change 
in the future
+       return sal_True;
 }
 // -------------------------------------------------------------------------
 sal_Bool SAL_CALL KabDatabaseMetaData::usesLocalFiles(  ) throw(SQLException, 
RuntimeException)
@@ -591,6 +597,8 @@
 // -------------------------------------------------------------------------
 ::rtl::OUString SAL_CALL KabDatabaseMetaData::getURL(  ) throw(SQLException, 
RuntimeException)
 {
+       // if someday we support more than the default address book,
+       // this method should return the URL which was used to create it
        ::rtl::OUString aValue = 
::rtl::OUString::createFromAscii("sdbc:address:kab:");
        return aValue;
 }
@@ -736,6 +744,12 @@
 // -------------------------------------------------------------------------
 sal_Bool SAL_CALL KabDatabaseMetaData::supportsResultSetType( sal_Int32 
setType ) throw(SQLException, RuntimeException)
 {
+       switch (setType)
+       {
+               case ResultSetType::FORWARD_ONLY:
+               case ResultSetType::SCROLL_INSENSITIVE:
+                       return sal_True;
+       }
        return sal_False;
 }
 // -------------------------------------------------------------------------




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to