Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

CTBodbcStatement.icc

Go to the documentation of this file.
00001 //
00002 // $Id: CTBodbcStatement.icc,v 1.3 1999/04/23 09:43:07 mueller Exp $
00003 //
00004 /*----------------------------------------------------------------------------*/
00005 /* C Tool Box: Designed and implemented by:                                   */
00006 /*    Walter F.J. Mueller   Gesellschaft fuer Schwerionenforschung (GSI)      */
00007 /*                          Planckstrasse 1, D-64291 Darmstadt, Germany       */
00008 /*                  Email:  W.F.J.Mueller@gsi.de                              */
00009 /*                  WWW:    http://www-kp3.gsi.de/www/kp3/people/mueller.html */
00010 /*------------------------------------------+---------------------------------*/
00011 
00012 //------------------------------------------+-----------------------------------
00014 
00015 inline bool CTBodbcStatement::GetData(int i_icol,
00016                                       char* c_value, int i_size, bool& b_null)
00017 {
00018   return GetData(i_icol,SQL_C_CHAR,c_value,i_size,b_null);
00019 }
00020 
00021 //------------------------------------------+-----------------------------------
00023 
00024 inline bool CTBodbcStatement::GetData(int i_icol,
00025                                       CTBint32& i_value, bool& b_null)
00026 {
00027   return GetData(i_icol,SQL_C_SLONG,&i_value,sizeof(CTBint32),b_null);
00028 }
00029 
00030 //------------------------------------------+-----------------------------------
00032 
00033 inline bool CTBodbcStatement::GetData(int i_icol,
00034                                       float& f_value, bool& b_null)
00035 {
00036   return GetData(i_icol,SQL_C_FLOAT,&f_value,sizeof(float),b_null);
00037 }
00038 
00039 //------------------------------------------+-----------------------------------
00041 
00042 inline bool CTBodbcStatement::GetData(int i_icol,
00043                                       double& d_value, bool& b_null)
00044 {
00045   return GetData(i_icol,SQL_C_DOUBLE,&d_value,sizeof(double),b_null);
00046 }
00047 
00048 //------------------------------------------+-----------------------------------
00050 
00051 inline bool CTBodbcStatement::GetData(int i_icol,
00052                                       CTBodbcTime& time, bool& b_null)
00053 {
00054   return GetData(i_icol,SQL_C_TIMESTAMP,&time.Data(),
00055                  sizeof(TIMESTAMP_STRUCT),b_null);
00056 }
00057 
00058 //------------------------------------------+-----------------------------------
00060 
00061 inline bool CTBodbcStatement::BindIParameter(int i_ipar, SWORD i_sqltype,
00062                                              CTBint32& i_pvalue)
00063 {
00064   return BindIParameter(i_ipar,SQL_C_SLONG,i_sqltype,&i_pvalue);
00065 }
00066 
00067 //------------------------------------------+-----------------------------------
00069 
00070 inline bool CTBodbcStatement::BindIParameter(int i_ipar, SWORD i_sqltype,
00071                                              float& f_pvalue)
00072 {
00073   return BindIParameter(i_ipar,SQL_C_FLOAT,i_sqltype,&f_pvalue);
00074 }
00075 
00076 //------------------------------------------+-----------------------------------
00078 
00079 inline bool CTBodbcStatement::BindIParameter(int i_ipar, SWORD i_sqltype,
00080                                              double& d_pvalue)
00081 {
00082   return BindIParameter(i_ipar,SQL_C_DOUBLE,i_sqltype,&d_pvalue);
00083 }
00084 
00085 //------------------------------------------+-----------------------------------
00087 
00088 inline bool CTBodbcStatement::BindIParameter(int i_ipar, SWORD i_sqltype,
00089                                              CTBodbcTime& pvalue)
00090 {
00091   return BindIParameter(i_ipar,SQL_C_TIMESTAMP,i_sqltype,&pvalue.Data());
00092 }
00093 
00094 //------------------------------------------+-----------------------------------
00096 
00097 inline bool CTBodbcStatement::BindCol(int i_icol, char* c_cvalue, int i_size,
00098                                       CTBint32& i_rsize)
00099 {
00100   return BindCol(i_icol,SQL_C_CHAR,c_cvalue,i_size,i_rsize);
00101 }
00102 
00103 //------------------------------------------+-----------------------------------
00105 
00106 inline bool CTBodbcStatement::BindCol(int i_icol, CTBint32& i_cvalue,
00107                                       CTBint32& i_rsize)
00108 {
00109   return BindCol(i_icol,SQL_C_SLONG,&i_cvalue,sizeof(CTBint32),i_rsize);
00110 }
00111 
00112 //------------------------------------------+-----------------------------------
00114 
00115 inline bool CTBodbcStatement::BindCol(int i_icol, float& f_cvalue,
00116                                       CTBint32& i_rsize)
00117 {
00118   return BindCol(i_icol,SQL_C_FLOAT,&f_cvalue,sizeof(float),i_rsize);
00119 }
00120 
00121 //------------------------------------------+-----------------------------------
00123 
00124 inline bool CTBodbcStatement::BindCol(int i_icol, double& d_cvalue,
00125                                       CTBint32& i_rsize)
00126 {
00127   return BindCol(i_icol,SQL_C_DOUBLE,&d_cvalue,sizeof(double),i_rsize);
00128 }
00129 
00130 //------------------------------------------+-----------------------------------
00132 
00133 inline bool CTBodbcStatement::BindCol(int i_icol, CTBodbcTime& value,
00134                                       CTBint32& i_rsize)
00135 {
00136   return BindCol(i_icol,SQL_C_TIMESTAMP,&value.Data(),sizeof(TIMESTAMP_STRUCT),
00137                  i_rsize);
00138 }
00139 

Generated at Fri Oct 24 18:16:03 2003 for CTBodbc by doxygen1.2.9-20010812 written by Dimitri van Heesch, © 1997-2001