Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-03 08:22:06

0001 // $Id: ODBCResultSetMetaData.cxx,v 1.1.1.1 2004/02/18 20:58:02 dave Exp $
0002 //*-- Author : Valeriy Onuchin 14/02/2000 
0003 //
0004 
0005 /**************************************************************************
0006 
0007    ROOT wrappers of libodbc++ library
0008     
0009    Copyright (C) 1999-2000 Manush Dodunekov <manush@stendahls.net>
0010    
0011    This library is free software; you can redistribute it and/or
0012    modify it under the terms of the GNU Library General Public
0013    License as published by the Free Software Foundation; either
0014    version 2 of the License, or (at your option) any later version.
0015    
0016    This library is distributed in the hope that it will be useful,
0017    but WITHOUT ANY WARRANTY; without even the implied warranty of
0018    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0019    Library General Public License for more details.
0020    
0021    You should have received a copy of the GNU Library General Public License
0022    along with this library; see the file COPYING.  If not, write to
0023    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
0024    Boston, MA 02111-1307, USA.
0025 
0026 **************************************************************************/
0027 
0028 ////////////////////////////////////////////////////////////////////
0029 //
0030 // An object that can be used to find out about the 
0031 // types and properties of the columns in a TSQLResultSet. 
0032 //
0033 // See also:
0034 //    TSQLResultSet TSQLDatabaseMetaData
0035 //
0036 ////////////////////////////////////////////////////////////////////
0037    
0038 #include "ODBCResultSetMetaData.h"
0039 #include "ODBCResultSet.h"
0040 #include <RDBC/odbc++/resultsetmetadata.h>
0041 
0042 using namespace odbc;
0043  
0044 ClassImpQ(ODBCResultSetMetaData)
0045 
0046 ///////////////////////////////////////////////////////////////////// 
0047 //___________________________________________________________________   
0048 ODBCResultSetMetaData::ODBCResultSetMetaData( TSQLResultSet* rs,void* imp ):
0049    TSQLResultSetMetaData(rs,imp)
0050 {
0051    // ctor  
0052    
0053    fResultSet = rs;
0054 }
0055 
0056 //___________________________________________________________________
0057 ODBCResultSetMetaData::~ODBCResultSetMetaData()
0058 {
0059    // dtor  
0060 
0061    fResultSet = 0;
0062 //   odbc::ResultSetMetaData* imp = (odbc::ResultSetMetaData*)fImp;
0063    fImp = 0;
0064    
0065    try {         
0066         //   
0067     //   delete imp;  // !!! private dtor, deleted by result set 
0068    } catch(odbc::SQLException& e) {
0069       Throw( new TSQLException( ODBCXX_STRING_CSTR(e.getMessage()),
0070                                 ODBCXX_STRING_CSTR(e.getSQLState()),
0071                                 e.getErrorCode()) );
0072    }
0073 }
0074                          
0075 //___________________________________________________________________
0076 Int_t ODBCResultSetMetaData::GetColumnCount()
0077 {                   
0078    // Returns the number of columns in this TSQLResultSet
0079    // If there are no columns in the result set, zero is
0080    // returned.
0081    //
0082    //  Returns:
0083    //       the number of columns
0084    //  Throws:
0085    //       TSQLException - if a database access error occurs
0086 
0087    Int_t return_value = 0;
0088    
0089    if(!fImp) { Destroyed(); return return_value; }
0090    odbc::ResultSetMetaData* imp = (odbc::ResultSetMetaData*)fImp;
0091       
0092    try {      
0093       return_value = imp->getColumnCount();
0094    } catch(odbc::SQLException& e) {
0095       Throw( new TSQLException( ODBCXX_STRING_CSTR(e.getMessage()),
0096                                 ODBCXX_STRING_CSTR(e.getSQLState()),
0097                                 e.getErrorCode()) );
0098       return 0;
0099    }
0100    return return_value;
0101 }
0102 
0103 //___________________________________________________________________
0104 Bool_t ODBCResultSetMetaData::IsAutoIncrement( Int_t column )
0105 {                       
0106    // Indicates whether the column is automatically numbered, 
0107    // thus read-only.
0108    //
0109    //  Parameters:
0110    //       column - the first column is 1, the second is 2, ...
0111    //  Returns:
0112    //       kTRUE - the column's data type is an auto increment data
0113    //               type
0114    //       kFALSE - the  column's data type is not an auto increment
0115    //                data type or the column does not contain numeric 
0116    //                data
0117    //  Throws:
0118    //       TSQLException - if a database access error occurs
0119    //
0120    // 
0121    
0122    Bool_t return_value = kFALSE;
0123    
0124    if(!fImp) { Destroyed(); return return_value; }
0125    odbc::ResultSetMetaData* imp = (odbc::ResultSetMetaData*)fImp;
0126    
0127    try {      
0128       return_value = imp->isAutoIncrement(column);
0129    } catch(odbc::SQLException& e) {
0130       Throw( new TSQLException( ODBCXX_STRING_CSTR(e.getMessage()),
0131                                 ODBCXX_STRING_CSTR(e.getSQLState()),
0132                                 e.getErrorCode()) );
0133       return kFALSE;
0134    }   
0135    return return_value;
0136 }
0137 
0138 //___________________________________________________________________
0139 Bool_t ODBCResultSetMetaData::IsCaseSensitive( Int_t column )
0140 {                        
0141    // Indicates whether a column's case sensitive for collations
0142    // and comparisons.
0143    //
0144    //  Parameters:
0145    //       column - the first column is 1, the second is 2, ...
0146    //  Returns:
0147    //       kTRUE if so
0148    //  Throws:
0149    //       TSQLException - if a database access error occurs
0150 
0151    Bool_t return_value = kFALSE;
0152    
0153    if(!fImp) { Destroyed(); return return_value; }
0154    odbc::ResultSetMetaData* imp = (odbc::ResultSetMetaData*)fImp;
0155    
0156    try {      
0157       return_value = imp->isCaseSensitive(column);
0158    } catch(odbc::SQLException& e) {
0159       Throw( new TSQLException( ODBCXX_STRING_CSTR(e.getMessage()),
0160                                 ODBCXX_STRING_CSTR(e.getSQLState()),
0161                                 e.getErrorCode()) );
0162       return kFALSE;
0163    }   
0164    return return_value;
0165 }
0166 
0167 //___________________________________________________________________
0168 Bool_t ODBCResultSetMetaData::IsSearchable( Int_t column )                     
0169 {
0170    // Indicates whether the column can be used in a 'WHERE' clause.
0171    //
0172    //  Parameters:
0173    //       column - the first column is 1, the second is 2, ...
0174    //  Returns:
0175    //       kTRUE if so
0176    //  Throws:
0177    //       TSQLException - if a database access error occurs
0178 
0179    Bool_t return_value = kFALSE;
0180    
0181    if(!fImp) { Destroyed(); return return_value; }
0182    odbc::ResultSetMetaData* imp = (odbc::ResultSetMetaData*)fImp;
0183    
0184    try {
0185       return_value = imp->isSearchable(column);
0186    } catch(odbc::SQLException& e) {
0187       Throw( new TSQLException( ODBCXX_STRING_CSTR(e.getMessage()),
0188                                 ODBCXX_STRING_CSTR(e.getSQLState()),
0189                                 e.getErrorCode()) );
0190       return kFALSE;
0191    }  
0192    return return_value;
0193 }
0194 
0195 //___________________________________________________________________
0196 Bool_t ODBCResultSetMetaData::IsCurrency( Int_t column )
0197 {
0198    // Indicates whether the column is a cash value ( money data
0199    // type ).
0200    //
0201    //  Parameters:
0202    //       column - the first column is 1, the second is 2, ...
0203    //  Returns:
0204    //       kTRUE if so
0205    //  Throws:
0206    //       TSQLException - if a database access error occurs
0207 
0208    Bool_t return_value = kFALSE;
0209    
0210    if(!fImp) { Destroyed(); return return_value; }
0211    odbc::ResultSetMetaData* imp = (odbc::ResultSetMetaData*)fImp;
0212    
0213    try {
0214       return_value = imp->isCurrency(column);
0215    } catch(odbc::SQLException& e) {
0216       Throw( new TSQLException( ODBCXX_STRING_CSTR(e.getMessage()),
0217                                 ODBCXX_STRING_CSTR(e.getSQLState()),
0218                                 e.getErrorCode()) );
0219       return kFALSE;
0220    }   
0221    return return_value;
0222 }
0223 
0224 //___________________________________________________________________
0225 Bool_t ODBCResultSetMetaData::IsNullable( Int_t column )               
0226 {
0227    // Indicates the nullability of values in the designated column.
0228    //
0229    //  Parameters:
0230    //       column - the first column is 1, the second is 2, ...
0231    //  Returns:
0232    //       the nullability status of the given column; 
0233    //       one of columnNoNulls, columnNullable or 
0234    //       columnNullableUnknown
0235    //  Throws:
0236    //       TSQLException - if a database access error occurs
0237 
0238    Bool_t return_value = kFALSE;
0239    
0240    if(!fImp) { Destroyed(); return return_value; }
0241    odbc::ResultSetMetaData* imp = (odbc::ResultSetMetaData*)fImp;
0242    
0243    try {
0244       return_value = imp->isNullable(column);
0245    } catch(odbc::SQLException& e) {
0246       Throw( new TSQLException( ODBCXX_STRING_CSTR(e.getMessage()),
0247                                 ODBCXX_STRING_CSTR(e.getSQLState()),
0248                                 e.getErrorCode()) );
0249       return kFALSE;
0250    }  
0251    return return_value;
0252 }
0253 
0254 //___________________________________________________________________
0255 Bool_t ODBCResultSetMetaData::IsSigned( Int_t column )                 
0256 {
0257    // Indicates whether values in the column are signed numbers
0258    //
0259    //  Parameters:
0260    //       column - the first column is 1, the second is 2, ...
0261    //  Returns:
0262    //       kTRUE if so
0263    //  Throws:
0264    //       TSQLException - if a database access error occurs
0265 
0266    Bool_t return_value = kFALSE;
0267    
0268    if(!fImp) { Destroyed(); return return_value; }
0269    odbc::ResultSetMetaData* imp = (odbc::ResultSetMetaData*)fImp;
0270    
0271    try {
0272       return_value = imp->isSigned(column); 
0273    } catch(odbc::SQLException& e) {
0274       Throw( new TSQLException( ODBCXX_STRING_CSTR(e.getMessage()),
0275                                 ODBCXX_STRING_CSTR(e.getSQLState()),
0276                                 e.getErrorCode()) );
0277       return kFALSE;
0278    }   
0279    return return_value;
0280 }
0281 
0282 //___________________________________________________________________
0283 Int_t ODBCResultSetMetaData::GetColumnDisplaySize( Int_t column )
0284 {                         
0285    // Indicates the column's normal max width in chars.
0286    //
0287    //  Parameters:
0288    //       column - the first column is 1, the second is 2, ...
0289    //  Returns:
0290    //       the normal maximum number of characteimp allowed as 
0291    //       the width of the designated column
0292    //  Throws:
0293    //       TSQLException - if a database access error occurs
0294 
0295    Int_t return_value = 0;
0296    
0297    if(!fImp) { Destroyed(); return return_value; }
0298    odbc::ResultSetMetaData* imp = (odbc::ResultSetMetaData*)fImp;
0299    
0300    try {
0301       return_value = imp->getColumnDisplaySize(column);
0302    } catch(odbc::SQLException& e) {
0303       Throw( new TSQLException( ODBCXX_STRING_CSTR(e.getMessage()),
0304                                 ODBCXX_STRING_CSTR(e.getSQLState()),
0305                                 e.getErrorCode()) );
0306       return 0;
0307    }   
0308    return return_value;
0309 }
0310 
0311 //___________________________________________________________________
0312 TString ODBCResultSetMetaData::GetColumnLabel( Int_t column )
0313 {                      
0314    // Gets the suggested column title for use in printouts 
0315    // and displays.
0316    //
0317    //  Parameters:
0318    //       column - the first column is 1, the second is 2, ...
0319    //  Returns:
0320    //       the suggested column title
0321    //  Throws:
0322    //       TSQLException - if a database access error occurs
0323 
0324    TString str;
0325    
0326    if(!fImp) { Destroyed(); return str; }
0327    odbc::ResultSetMetaData* imp = (odbc::ResultSetMetaData*)fImp;
0328    
0329    try {
0330       str = ODBCXX_STRING_CSTR( imp->getColumnLabel(column) );
0331    } catch(odbc::SQLException& e) {
0332       Throw( new TSQLException( ODBCXX_STRING_CSTR(e.getMessage()),
0333                                 ODBCXX_STRING_CSTR(e.getSQLState()),
0334                                 e.getErrorCode()) );
0335       return "";
0336    }   
0337    return str;
0338 }
0339 
0340 //___________________________________________________________________
0341 TString ODBCResultSetMetaData::GetColumnName( Int_t column )
0342 {                     
0343    // Gets a column's name.
0344    //
0345    //   Parameters:
0346    //        column - the first column is 1, the second is 2, ...
0347    //   Returns:
0348    //        column name
0349    //   Throws:
0350    //        TSQLException - if a database access error occurs
0351 
0352    TString str;
0353    
0354    if(!fImp) { Destroyed(); return str; }
0355    odbc::ResultSetMetaData* imp = (odbc::ResultSetMetaData*)fImp;
0356    
0357    try {
0358       str = ODBCXX_STRING_CSTR( imp->getColumnName(column) );
0359    } catch(odbc::SQLException& e) {
0360       Throw( new TSQLException( ODBCXX_STRING_CSTR(e.getMessage()),
0361                                 ODBCXX_STRING_CSTR(e.getSQLState()),
0362                                 e.getErrorCode()) );
0363       return "";
0364    }  
0365    return str;
0366 }
0367 
0368 //___________________________________________________________________
0369 TString ODBCResultSetMetaData::GetSchemaName( Int_t column )
0370 {                     
0371    // Gets a column's table's schema.
0372    //
0373    //  Parameters:
0374    //       column - the first column is 1, the second is 2, ...
0375    //  Returns:
0376    //       schema name or "" if not applicable
0377    //  Throws:
0378    //       TSQLException - if a database access error occurs
0379 
0380    TString str;
0381    
0382    if(!fImp) { Destroyed(); return str; }
0383    odbc::ResultSetMetaData* imp = (odbc::ResultSetMetaData*)fImp;
0384    
0385    try {
0386       str = ODBCXX_STRING_CSTR( imp->getSchemaName(column) );
0387    } catch(odbc::SQLException& e) {
0388       Throw( new TSQLException( ODBCXX_STRING_CSTR(e.getMessage()),
0389                                 ODBCXX_STRING_CSTR(e.getSQLState()),
0390                                 e.getErrorCode()) );
0391       return "";
0392    }   
0393    return str;
0394 }
0395 
0396 //___________________________________________________________________
0397 Int_t ODBCResultSetMetaData::GetPrecision( Int_t column )
0398 {  
0399    // Gets a column's number of decimal digits.
0400    //
0401    //  Parameters:
0402    //       column - the first column is 1, the second is 2, ...
0403    //  Returns:
0404    //       precIsion
0405    //  Throws:
0406    //       TSQLException - if a database access error occurs
0407 
0408    Int_t return_value = 0;
0409    
0410    if(!fImp) { Destroyed(); return return_value; }
0411    odbc::ResultSetMetaData* imp = (odbc::ResultSetMetaData*)fImp;
0412    
0413    try {
0414       return_value = imp->getPrecision(column);
0415    } catch(odbc::SQLException& e) {
0416       Throw( new TSQLException( ODBCXX_STRING_CSTR(e.getMessage()),
0417                                 ODBCXX_STRING_CSTR(e.getSQLState()),
0418                                 e.getErrorCode()) );
0419       return 0;
0420    }   
0421    return return_value;
0422 }
0423 
0424 //___________________________________________________________________
0425 Int_t ODBCResultSetMetaData::GetScale( Int_t column )             
0426 {
0427    // Gets a column's number of digits to right of the decimal point.
0428    //
0429    //  Parameters:
0430    //       column - the first column is 1, the second is 2, ...
0431    //  Returns:
0432    //       scale
0433    //  Throws:
0434    //       TSQLException - if a database access error occurs
0435 
0436    Int_t return_value = 0;
0437    
0438    if(!fImp) { Destroyed(); return return_value; }
0439    odbc::ResultSetMetaData* imp = (odbc::ResultSetMetaData*)fImp;
0440       
0441    try {
0442       return_value = imp->getScale(column);
0443    } catch(odbc::SQLException& e) {
0444       Throw( new TSQLException( ODBCXX_STRING_CSTR(e.getMessage()),
0445                                 ODBCXX_STRING_CSTR(e.getSQLState()),
0446                                 e.getErrorCode()) );
0447       return 0;
0448    }   
0449    return return_value;
0450 }
0451 
0452 //___________________________________________________________________
0453 TString ODBCResultSetMetaData::GetTableName( Int_t column )
0454 {                    
0455    // Gets a column's table name.
0456    //
0457    //  Parameters:
0458    //       column - the first column is 1, the second is 2, ...
0459    //  Returns:
0460    //       table name or "" if not applicable
0461    //  Throws:
0462    //       TSQLException - if a database access error occurs
0463 
0464    TString str;
0465    
0466    if(!fImp) { Destroyed(); return str; }
0467    odbc::ResultSetMetaData* imp = (odbc::ResultSetMetaData*)fImp;
0468    
0469    try {
0470       str = ODBCXX_STRING_CSTR( imp->getTableName(column) );
0471    } catch(odbc::SQLException& e) {
0472       Throw( new TSQLException( ODBCXX_STRING_CSTR(e.getMessage()),
0473                                 ODBCXX_STRING_CSTR(e.getSQLState()),
0474                                 e.getErrorCode()) );
0475       return "";
0476    }
0477    return str;
0478 }
0479 
0480 //___________________________________________________________________
0481 TString ODBCResultSetMetaData::GetCatalogName( Int_t column )
0482 {                      
0483    // Gets a column's table's catalog name.
0484    //
0485    //  Parameters:
0486    //       column - the first column is 1, the second is 2, ...
0487    //  Returns:
0488    //       column name or "" if not applicable.
0489    //  Throws:
0490    //       TSQLException - if a database access error occurs
0491 
0492    TString str;
0493    
0494    if(!fImp) { Destroyed(); return str; }
0495    odbc::ResultSetMetaData* imp = (odbc::ResultSetMetaData*)fImp;
0496    
0497    try {
0498       str = ODBCXX_STRING_CSTR( imp->getCatalogName(column) );
0499    } catch(odbc::SQLException& e) {
0500       Throw( new TSQLException( ODBCXX_STRING_CSTR(e.getMessage()),
0501                                 ODBCXX_STRING_CSTR(e.getSQLState()),
0502                                 e.getErrorCode()) );
0503       return "";
0504    }  
0505    return str;
0506 }
0507 
0508 //___________________________________________________________________
0509 Int_t ODBCResultSetMetaData::GetColumnType( Int_t column )
0510 {                  
0511    // Retrieves a column's SQL type. 
0512    //
0513    // enum ESQLTypes { 
0514    //       kBIGINT = -5,
0515    //       kBINARY = -2,
0516    //       kBIT = -7,
0517    //       kCHAR = 1,
0518    // #ifdef ODBC_VER_LESS_30 
0519    //       kDATE = 9,
0520    //       kTIME = 10,
0521    //       kTIMESTAMP = 11,
0522    // #endif     
0523    //       kDATE = 91,
0524    //       kTIME = 92,
0525    //       kTIMESTAMP = 93,
0526    //       kSMALLINT = 5,
0527    //       kDECIMAL = 3,
0528    //       kDOUBLE = 8,
0529    //       kFLOAT = 6,
0530    //       kINTEGER = 4,
0531    //       kLONGVARBINARY = -4,
0532    //       kLONGVARCHAR = -1,
0533    //       kNUMERIC = 2,
0534    //       kREAL = 7,
0535    //       kTINYINT = -6,
0536    //       kVARBINARY = -3,
0537    //       kVARCHAR  = 12 
0538    // };
0539    //   
0540    // Parameters:
0541    //       column - the first column is 1, the second is 2, ...
0542    //  Returns:
0543    //       SQL type from TSQLTypes
0544    //  Throws:
0545    //       TSQLException - if a database access error occurs
0546 
0547    Int_t return_value = 0;
0548    
0549    if(!fImp) { Destroyed(); return return_value; }
0550    odbc::ResultSetMetaData* imp = (odbc::ResultSetMetaData*)fImp;
0551       
0552    try {      
0553       return_value =  imp->getColumnType(column); 
0554    } catch(odbc::SQLException& e) {
0555       Throw( new TSQLException( ODBCXX_STRING_CSTR(e.getMessage()),
0556                                 ODBCXX_STRING_CSTR(e.getSQLState()),
0557                                 e.getErrorCode()) );
0558       return 0;
0559    }   
0560    return return_value;
0561 }
0562 
0563 //___________________________________________________________________
0564 TString ODBCResultSetMetaData::GetColumnTypeName( Int_t column )
0565 {
0566    // Retrieves a column's database-specific type name.
0567    // See TSQLTypes.h
0568    //
0569    //  Parameters:
0570    //       column - the first column is 1, the second is 2, ...
0571    //  Returns:
0572    //       type name used by the database. If the column type is 
0573    //       a user-defined type, then a fully-qualified type name 
0574    //       is returned.
0575    //  Throws:
0576    //       TSQLException - if a database access error occurs
0577 
0578    TString str;
0579    
0580    if(!fImp) { Destroyed(); return str; }
0581    odbc::ResultSetMetaData* imp = (odbc::ResultSetMetaData*)fImp;
0582    
0583    try {
0584       str = ODBCXX_STRING_CSTR( imp->getColumnTypeName(column) );
0585    } catch(odbc::SQLException& e) {
0586       Throw( new TSQLException( ODBCXX_STRING_CSTR(e.getMessage()),
0587                                 ODBCXX_STRING_CSTR(e.getSQLState()),
0588                                 e.getErrorCode()) );
0589       return "";
0590    }
0591    return str;
0592 }
0593 
0594 //___________________________________________________________________
0595 Bool_t ODBCResultSetMetaData::IsReadOnly( Int_t column )                   
0596 {
0597    // Indicates whether a column Is definitely not writable.
0598    //
0599    //  Parameters:
0600    //       column - the first column is 1, the second is 2, ...
0601    //  Returns:
0602    //       kTRUE if so
0603    //  Throws:
0604    //       TSQLException - if a database access error occurs
0605 
0606    Bool_t return_value = kTRUE;
0607    
0608    if(!fImp) { Destroyed(); return return_value; }
0609    odbc::ResultSetMetaData* imp = (odbc::ResultSetMetaData*)fImp;
0610    
0611    try {
0612       return_value = imp->isReadOnly(column);
0613    } catch(odbc::SQLException& e) {
0614       Throw( new TSQLException( ODBCXX_STRING_CSTR(e.getMessage()),
0615                                 ODBCXX_STRING_CSTR(e.getSQLState()),
0616                                 e.getErrorCode()) );
0617       return kTRUE;
0618    }  
0619    return return_value;
0620 }
0621 
0622 //___________________________________________________________________
0623 Bool_t ODBCResultSetMetaData::IsWritable( Int_t column )                   
0624 {
0625    // Indicates whether it is possible for a write on the column 
0626    // to succeed.
0627    //
0628    //  Parameters:
0629    //       column - the first column is 1, the second is 2, ...
0630    //  Returns:
0631    //       kTRUE if so
0632    //  Throws:
0633    //       TSQLException - if a database access error occurs
0634 
0635    Bool_t return_value = kFALSE;
0636    
0637    if(!fImp) { Destroyed(); return return_value; }
0638    odbc::ResultSetMetaData* imp = (odbc::ResultSetMetaData*)fImp;
0639    
0640    try {
0641       return_value = imp->isWritable(column);
0642    } catch(odbc::SQLException& e) {
0643       Throw( new TSQLException( ODBCXX_STRING_CSTR(e.getMessage()),
0644                                 ODBCXX_STRING_CSTR(e.getSQLState()),
0645                                 e.getErrorCode()) );
0646       return kFALSE;
0647    }   
0648    return return_value;
0649 }
0650 
0651 //___________________________________________________________________
0652 Bool_t ODBCResultSetMetaData::IsDefinitelyWritable( Int_t column )
0653 {                             
0654    // Indicates whether a write on the column will definitely succeed.
0655    //
0656    //  Parameters:
0657    //       column - the first column is 1, the second is 2, ...
0658    //  Returns:
0659    //       kTRUE if so
0660    //  Throws:
0661    //       TSQLException - if a database access error occurs
0662 
0663    Bool_t return_value = kFALSE;
0664    
0665    if(!fImp) { Destroyed(); return return_value; }
0666    odbc::ResultSetMetaData* imp = (odbc::ResultSetMetaData*)fImp;
0667       
0668    try {
0669       return_value = imp->isDefinitelyWritable(column);
0670    } catch(odbc::SQLException& e) {
0671       Throw( new TSQLException( ODBCXX_STRING_CSTR(e.getMessage()),
0672                                 ODBCXX_STRING_CSTR(e.getSQLState()),
0673                                 e.getErrorCode()) );
0674       return kFALSE;
0675    }   
0676    return return_value;
0677 }