// CodeGear C++Builder
// Copyright (c) 1995, 2020 by Embarcadero Technologies, Inc.
// All rights reserved

// (DO NOT EDIT: machine generated header) 'ADO_QImport3Access.pas' rev: 34.00 (Windows)

#ifndef Ado_qimport3accessHPP
#define Ado_qimport3accessHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member 
#pragma pack(push,8)
#include <System.hpp>
#include <SysInit.hpp>
#include <System.SysUtils.hpp>
#include <System.Variants.hpp>
#include <System.Win.ComObj.hpp>
#include <Winapi.ActiveX.hpp>
#include <System.Classes.hpp>
#include <Data.Win.ADODB.hpp>
#include <Data.DB.hpp>
#include <System.IniFiles.hpp>
#include <QImport3.hpp>
#include <QImport3StrTypes.hpp>
#include <QImport3Common.hpp>
#include <QImport3StrIDs.hpp>
#include <System.WideStrings.hpp>

//-- user supplied -----------------------------------------------------------

namespace Ado_qimport3access
{
//-- forward type declarations -----------------------------------------------
class DELPHICLASS TADO_QImport3Access;
//-- type declarations -------------------------------------------------------
typedef System::DynamicArray<System::UnicodeString> TStringArray;

typedef System::DynamicArray<Data::Db::TFieldType> TFieldTypes;

typedef System::DynamicArray<int> TFieldSizes;

enum DECLSPEC_DENUM TQImportAccessSourceType : unsigned char { isTable, isSQL };

enum DECLSPEC_DENUM TQImportAccessVersion : unsigned char { avAccess97_2003, avAccess2007 };

class PASCALIMPLEMENTATION TADO_QImport3Access : public Qimport3::TQImport3
{
	typedef Qimport3::TQImport3 inherited;
	
private:
	System::Classes::TStrings* FSQL;
	System::UnicodeString FTableName;
	System::UnicodeString FPassword;
	System::UnicodeString FLogin;
	TQImportAccessSourceType FSourceType;
	Data::Win::Adodb::TADOQuery* FADO;
	int FSkipCounter;
	TQImportAccessVersion FVersion;
	void __fastcall SetSQL(System::Classes::TStrings* const Value);
	System::UnicodeString __fastcall GetConnectionString();
	
protected:
	virtual void __fastcall StartImport();
	virtual bool __fastcall CheckCondition();
	virtual bool __fastcall Skip();
	virtual void __fastcall FillImportRow();
	virtual Qimport3::TQImportResult __fastcall ImportData();
	virtual void __fastcall ChangeCondition();
	virtual void __fastcall FinishImport();
	virtual void __fastcall DoLoadConfiguration(System::Inifiles::TIniFile* IniFile);
	virtual void __fastcall DoSaveConfiguration(System::Inifiles::TIniFile* IniFile);
	virtual void __fastcall DoAfterSetFileName();
	virtual void __fastcall CheckProperties();
	
public:
	__fastcall virtual TADO_QImport3Access(System::Classes::TComponent* AOwner);
	__fastcall virtual ~TADO_QImport3Access();
	void __fastcall GetTableNames(System::Widestrings::TWideStrings* List)/* overload */;
	void __fastcall GetTableNames(System::Classes::TStrings* List)/* overload */;
	void __fastcall GetFieldNames(TStringArray &FieldNames, TStringArray &FieldTypesString, TFieldTypes &FieldTypes, TFieldSizes &FieldSizes);
	
__published:
	__property FileName = {default=0};
	__property SkipFirstRows = {default=0};
	__property System::UnicodeString TableName = {read=FTableName, write=FTableName};
	__property System::Classes::TStrings* SQL = {read=FSQL, write=SetSQL};
	__property TQImportAccessSourceType SourceType = {read=FSourceType, write=FSourceType, default=0};
	__property System::UnicodeString Login = {read=FLogin, write=FLogin};
	__property System::UnicodeString Password = {read=FPassword, write=FPassword};
};


//-- var, const, procedure ---------------------------------------------------
extern DELPHI_PACKAGE bool __fastcall IsEncryptedAccessFile(const System::WideString AccessFile);
}	/* namespace Ado_qimport3access */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_ADO_QIMPORT3ACCESS)
using namespace Ado_qimport3access;
#endif
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// Ado_qimport3accessHPP
