//---------------------------------------------------------------------------

#ifndef CDSItsObjectFH
#define CDSItsObjectFH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <ADODB.hpp>
#include <DB.hpp>
//---------------------------------------------------------------------------

/*
*  Process class
*/
class TCDSItsObject
{
public:
    TCDSItsObject();
    virtual ~TCDSItsObject();

protected:
    AnsiString FErrorString;
    void __fastcall SetErrorString(AnsiString AErrorString);

    bool __fastcall SQLText(TADOQuery *adoQry, String sQry, bool AReadOnly=true);
    bool __fastcall SQLBind(TADOQuery *adoQry, String param, String var);
    bool __fastcall SQLClose(TADOQuery *adoQry);
    int  __fastcall SQLOpen(TADOQuery *adoQry);
    int  __fastcall SQLExec(TADOQuery *adoQry);
    void __fastcall SQLFree(TADOQuery *adoQry)
    {
        if (adoQry)
        {
            SQLClose(adoQry);
            if(adoQry) delete adoQry; adoQry = NULL;
        }
    }

public:
	__property AnsiString ErrorString = {read=FErrorString, write=SetErrorString};
};
//---------------------------------------------------------------------------

#endif
