src/Common/ODBC/Parameter.h

Go to the documentation of this file.
00001 #pragma once
00002 
00003 namespace AppSecInc
00004 {
00005         namespace Databases
00006         {
00007                 namespace ODBC
00008                 {
00010             class ODBCParameter : public ODBCBuffer
00011                         {
00012             private:
00014                                 SQLSMALLINT _iotype;
00016                                 SQLSMALLINT _parametertype;
00018                                 std::wstring _name;
00019                         public:
00020                 void operator=(const ODBCParameter&);
00022                                 SQLSMALLINT GetIOType() const { return _iotype; }
00024                                 SQLSMALLINT GetParameterType() const { return _parametertype; }
00026                                 const std::wstring& GetName() const { return _name; }
00028                                 void BindAt(SQLHANDLE hstmt, SQLHDESC hipd, int index);
00030                                 ODBCParameter(const ODBCParameter& parameter);
00031                                 ODBCParameter(const std::wstring& name, SQLSMALLINT iotype, SQLSMALLINT valuetype, SQLSMALLINT parametertype, SQLINTEGER datasize);
00032                                 ODBCParameter(const std::wstring& name, const std::wstring& value, SQLSMALLINT iotype = SQL_PARAM_INPUT);
00033                                 ODBCParameter(const std::wstring& name, const std::string& value, SQLSMALLINT iotype = SQL_PARAM_INPUT);
00034                                 ODBCParameter(const std::wstring& name, const SYSTEMTIME& value, SQLSMALLINT iotype = SQL_PARAM_INPUT);
00035                                 ODBCParameter(const std::wstring& name, const GUID& value, SQLSMALLINT iotype = SQL_PARAM_INPUT);
00036                                 ODBCParameter(const std::wstring& name, bool value, SQLSMALLINT iotype = SQL_PARAM_INPUT);
00037                                 ODBCParameter(const std::wstring& name, char value, SQLSMALLINT iotype = SQL_PARAM_INPUT);
00038                                 ODBCParameter(const std::wstring& name, wchar_t value, SQLSMALLINT iotype = SQL_PARAM_INPUT);
00039                                 ODBCParameter(const std::wstring& name, int value, SQLSMALLINT iotype = SQL_PARAM_INPUT);
00040                                 ODBCParameter(const std::wstring& name, short value, SQLSMALLINT iotype = SQL_PARAM_INPUT);
00041                                 ODBCParameter(const std::wstring& name, float value, SQLSMALLINT iotype = SQL_PARAM_INPUT);
00042                                 ODBCParameter(const std::wstring& name, double value, SQLSMALLINT iotype = SQL_PARAM_INPUT);
00044                 static ODBCParameter Create(const std::wstring name, const std::wstring& value, SQLSMALLINT sqltype, SQLSMALLINT iotype = SQL_PARAM_INPUT);
00045                                 virtual ~ODBCParameter();
00046                         };
00047                 }
00048         }
00049 }
00050 
00051 


© Application Security Inc. - All Rights Reserved http://msiext.codeplex.com