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

#ifndef DBDbFH
#define DBDbFH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ADODB.hpp>
#include <DB.hpp>
//---------------------------------------------------------------------------
class TDMDb : public TDataModule
{
__published:	// IDE-managed Components
    void __fastcall DataModuleCreate(TObject *Sender);
    void __fastcall DataModuleDestroy(TObject *Sender);
private:	// User declarations
    TADOConnection *FDbConn;
    String          FErrorString;
    String          FConnString;

public:		// User declarations
    __fastcall TDMDb(TComponent* Owner);

    TADOConnection *GetConnection() { return FDbConn; }
    void __fastcall SetConnectString(String AProvider, String AUserName, String APassword, String AServerName, String ACatalog="");

    void __fastcall SetErrorString(String AErrorString);
	__property String  ErrorString = {read=FErrorString, write=SetErrorString};
};
//---------------------------------------------------------------------------
extern PACKAGE TDMDb *DMDb;
//---------------------------------------------------------------------------
#endif
