home *** CD-ROM | disk | FTP | other *** search
- //----------------------------------------------------------------------------
- // UpdSqlEd.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
- // From: UpdSqlEd.pas
- //----------------------------------------------------------------------------
- #ifndef UpdSqlEdHPP
- #define UpdSqlEdHPP
- //----------------------------------------------------------------------------
- #include <Menus.hpp>
- #include <Windows.hpp>
- #include <SysUtils.hpp>
- #include <Classes.hpp>
- #include <ComCtrls.hpp>
- #include <Controls.hpp>
- #include <StdCtrls.hpp>
- #include <ExtCtrls.hpp>
- #include <DBTables.hpp>
- #include <DB.hpp>
- #include <Forms.hpp>
- #include <System.hpp>
- #pragma warn -par
- #pragma warn -hid
- #pragma warn -inl
-
- namespace Updsqled
- {
- //-- type declarations -------------------------------------------------------
- typedef void __fastcall (__closure *TWaitMethod)(void);
-
- class __declspec(delphiclass) TUpdateSQLEditForm;
- class __declspec(pascalimplementation) TUpdateSQLEditForm : public Forms::TForm
- {
- typedef Forms::TForm inherited;
-
- __published:
- Stdctrls::TButton* OkButton;
- Stdctrls::TButton* CancelButton;
- Stdctrls::TButton* HelpButton;
- Stdctrls::TButton* GenerateButton;
- Stdctrls::TButton* PrimaryKeyButton;
- Stdctrls::TButton* DefaultButton;
- Stdctrls::TComboBox* UpdateTableName;
- Comctrls::TTabSheet* FieldsPage;
- Comctrls::TTabSheet* SQLPage;
- Comctrls::TPageControl* PageControl;
- Stdctrls::TListBox* KeyFieldList;
- Stdctrls::TListBox* UpdateFieldList;
- Stdctrls::TGroupBox* GroupBox1;
- Stdctrls::TLabel* Label1;
- Stdctrls::TMemo* SQLMemo;
- Dbtables::TTable* TempTable;
- Extctrls::TRadioGroup* StatementType;
- Stdctrls::TCheckBox* QuoteFields;
- Stdctrls::TButton* GetTableFieldsButton;
- Menus::TPopupMenu* FieldListPopup;
- Menus::TMenuItem* miSelectAll;
- Menus::TMenuItem* miClearAll;
- void __fastcall FormCreate(System::TObject* Sender);
- void __fastcall HelpButtonClick(System::TObject* Sender);
- void __fastcall StatementTypeClick(System::TObject* Sender);
- void __fastcall OkButtonClick(System::TObject* Sender);
- void __fastcall DefaultButtonClick(System::TObject* Sender);
- void __fastcall GenerateButtonClick(System::TObject* Sender);
- void __fastcall PrimaryKeyButtonClick(System::TObject* Sender);
- void __fastcall PageControlChanging(System::TObject* Sender, bool &AllowChange);
- void __fastcall FormDestroy(System::TObject* Sender);
- void __fastcall GetTableFieldsButtonClick(System::TObject* Sender);
- void __fastcall SettingsChanged(System::TObject* Sender);
- void __fastcall FormCloseQuery(System::TObject* Sender, bool &CanClose);
- void __fastcall UpdateTableNameChange(System::TObject* Sender);
- void __fastcall UpdateTableNameClick(System::TObject* Sender);
- void __fastcall SelectAllClick(System::TObject* Sender);
- void __fastcall ClearAllClick(System::TObject* Sender);
- void __fastcall SQLMemoKeyPress(System::TObject* Sender, char &Key);
-
- private:
- int StmtIndex;
- Db::TDBDataSet* DataSet;
- Db::TDatabase* Database;
- bool DatabaseOpened;
- Dbtables::TUpdateSQL* UpdateSQL;
- bool FSettingsChanged;
- bool FDatasetDefaults;
- Classes::TStrings* SQLText[3];
- void __fastcall CheckFieldTypes(Classes::TStrings* UpdateFieldList);
- System::AnsiString __fastcall GetTableRef(const System::AnsiString TabName, const System::AnsiString
- QuoteChar);
- bool __fastcall DatabaseOpen(void);
- bool __fastcall Edit(void);
- void __fastcall GenWhereClause(const System::AnsiString TabAlias, const System::AnsiString QuoteChar
- , Classes::TStrings* KeyFields, Classes::TStrings* SQL);
- void __fastcall GenDeleteSQL(const System::AnsiString TableName, const System::AnsiString QuoteChar
- , Classes::TStrings* KeyFields, Classes::TStrings* SQL);
- void __fastcall GenInsertSQL(const System::AnsiString TableName, const System::AnsiString QuoteChar
- , Classes::TStrings* UpdateFields, Classes::TStrings* SQL);
- void __fastcall GenModifySQL(const System::AnsiString TableName, const System::AnsiString QuoteChar
- , Classes::TStrings* KeyFields, Classes::TStrings* UpdateFields, Classes::TStrings* SQL);
- void __fastcall GenerateSQL(void);
- void __fastcall GetDataSetFieldNames(void);
- void __fastcall GetTableFieldNames(void);
- void __fastcall InitGenerateOptions(void);
- void __fastcall InitUpdateTableNames(void);
- void __fastcall SetButtonStates(void);
- void __fastcall SelectPrimaryKeyFields(void);
- void __fastcall SetDefaultSelections(void);
- void __fastcall ShowWait(TWaitMethod WaitMethod);
- public:
- /* TForm.Create */ __fastcall virtual TUpdateSQLEditForm(Classes::TComponent* AOwner) : Forms::TForm(
- AOwner) { }
- /* TForm.CreateNew */ __fastcall TUpdateSQLEditForm(Classes::TComponent* AOwner, int Dummy) : Forms::
- TForm(AOwner, Dummy) { }
- /* TForm.Destroy */ __fastcall virtual ~TUpdateSQLEditForm(void) { }
-
- public:
- /* TWinControl.CreateParented */ __fastcall TUpdateSQLEditForm(HWND ParentWindow) : Forms::TForm(ParentWindow
- ) { }
-
- };
-
- enum TSQLToken { stSymbol, stAlias, stNumber, stComma, stEQ, stOther, stLParen, stRParen, stEnd };
-
- class __declspec(delphiclass) TSQLParser;
- class __declspec(pascalimplementation) TSQLParser : public System::TObject
- {
- typedef System::TObject inherited;
-
- private:
- System::AnsiString FText;
- char *FSourcePtr;
- char *FTokenPtr;
- System::AnsiString FTokenString;
- TSQLToken FToken;
- TSQLToken __fastcall NextToken(void);
- bool __fastcall TokenSymbolIs(const System::AnsiString S);
- void __fastcall Reset(void);
-
- public:
- __fastcall TSQLParser(const System::AnsiString Text);
- void __fastcall GetSelectTableNames(Classes::TStrings* List);
- void __fastcall GetUpdateTableName( System::AnsiString &TableName);
- void __fastcall GetUpdateFields(Classes::TStrings* List);
- void __fastcall GetWhereFields(Classes::TStrings* List);
- public:
- /* TObject.Destroy */ __fastcall virtual ~TSQLParser(void) { }
-
- };
-
- //-- var, const, procedure ---------------------------------------------------
- extern bool __fastcall EditUpdateSQL(Dbtables::TUpdateSQL* AUpdateSQL);
-
- } /* namespace Updsqled */
-
- #pragma warn .par
- #pragma warn .hid
- #pragma warn .inl
-
- #if !defined(NO_IMPLICIT_NAMESPACE_USE)
- using namespace Updsqled;
- #endif
- //-- end unit ----------------------------------------------------------------
- #endif // UpdSqlEd
-