src/odbc/odbcCommon.h

Go to the documentation of this file.
00001 #ifndef _ODBC_COMMON_H_
00002 #define _ODBC_COMMON_H_
00003 
00004 #include <stdio.h>
00005 #include <stdlib.h>
00006 #include <string.h>
00007 #include <vector>
00008 
00009 // SQL Standard headers
00010 #include <sqlext.h>
00011 
00012 // SQLAPI Interface
00013 #include <AbsSqlStatement.h>
00014 
00015 // Forward Declaration
00016 class CSqlOdbcEnv;
00017 class CSqlOdbcDbc;
00018 class CSqlOdbcStmt;
00019 class CSqlOdbcDesc;
00020 
00021 // ODBC internal headers
00022 #include "odbcError.h"
00023 #include "odbcEnv.h"
00024 #include "odbcDbc.h"
00025 #include "odbcDesc.h"
00026 #include "odbcStmt.h"
00027 
00028 // There is not equivalent mode in CSQL, should confirm. ??
00029 #define ACCESSMODE_READ_ONLY   0
00030 #define ACCESSMODE_READ_WRITE  1
00031 
00032 // Is handle valid ?
00033 SQLRETURN isValidHandle( SQLHANDLE hnd, SQLSMALLINT handleType );
00034 
00035 // Is C type valid/supported ?
00036 SQLRETURN isValidCType( SQLSMALLINT type );
00037 
00038 // Is SQL type valid/supported ?
00039 SQLRETURN isValidSQLType( SQLSMALLINT type );
00040 
00041 // Type conversion functions
00042 void copyFromOdbc(AbsSqlStatement *stmt, int paramNo, SQLUINTEGER destLen, 
00043                   void *odbcData, SQLUINTEGER odbcLen, SQLSMALLINT type);
00044 SQLINTEGER copyToOdbc(void *odbcData, SQLUINTEGER odbcLen, 
00045                       void *sourceData, SQLUINTEGER sourceLen,SQLSMALLINT type);
00046 
00047 void getInputBuffer(void **buffer,SQLSMALLINT  type,SQLUINTEGER length);
00048 
00049 DataType getCSqlType( SQLSMALLINT type );
00050 
00051 SQLSMALLINT getSQLType( DataType type );
00052 
00053 SQLCHAR *getSQLTypeName( SQLSMALLINT type );
00054  
00055 #endif

Generated on Mon Jun 9 22:37:14 2008 for csql by  doxygen 1.4.7