home *** CD-ROM | disk | FTP | other *** search
- //----------------------------------------------------------------------------
- // UpdSqlEd.hpp - dcc32 generated hdr (DO NOT EDIT) rev: -2
- // From: UpdSqlEd.pas
- //----------------------------------------------------------------------------
- #ifndef UpdSqlEdHPP
- #define UpdSqlEdHPP
- //----------------------------------------------------------------------------
- #ifndef MenusHPP
- #include <Menus.hpp>
- #endif
-
- #ifndef WindowsHPP
- #include <Windows.hpp>
- #endif
-
- #ifndef SysUtilsHPP
- #include <SysUtils.hpp>
- #endif
-
- #ifndef ClassesHPP
- #include <Classes.hpp>
- #endif
-
- #ifndef ComCtrlsHPP
- #include <ComCtrls.hpp>
- #endif
-
- #ifndef ControlsHPP
- #include <Controls.hpp>
- #endif
-
- #ifndef StdCtrlsHPP
- #include <StdCtrls.hpp>
- #endif
-
- #ifndef ExtCtrlsHPP
- #include <ExtCtrls.hpp>
- #endif
-
- #ifndef DBTablesHPP
- #include <DBTables.hpp>
- #endif
-
- #ifndef DBHPP
- #include <DB.hpp>
- #endif
-
- #ifndef FormsHPP
- #include <Forms.hpp>
- #endif
-
- #ifndef SystemHPP
- #include <System.hpp>
- #endif
-
- namespace Updsqled
- {
- //-- type declarations -------------------------------------------------------
- typedef void __fastcall (__closure *TWaitMethod)(void);
-
- class __declspec(delphiclass) TUpdateSQLEditForm;
- class __declspec(pascalimplementation) TUpdateSQLEditForm : public Forms::TForm
- {
- typedef TUpdateSQLEditForm ThisClass;
- 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, System::Boolean &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, System::Boolean &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, System::Char &Key);
-
- private:
- System::Integer StmtIndex;
- Db::TDBDataSet *DataSet;
- Db::TDatabase *Database;
- System::Boolean DatabaseOpened;
- Dbtables::TUpdateSQL *UpdateSQL;
- System::Boolean FSettingsChanged;
- System::Boolean FDatasetDefaults;
- Classes::TStrings *SQLText[3];
- void __fastcall CheckFieldTypes(Classes::TStrings *UpdateFieldList);
- System::AnsiString __fastcall GetTableRef(const System::AnsiString TabName, const System::AnsiString
- QuoteChar);
- System::Boolean __fastcall DatabaseOpen(void);
- System::Boolean __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, System::Integer
- Dummy) : Forms::TForm(AOwner, Dummy) { }
- /* !! TForm.Destroy */ __fastcall virtual ~TUpdateSQLEditForm(void) { }
-
- };
-
- enum TSQLToken { stSymbol, stAlias, stNumber, stComma, stEQ, stOther, stLParen, stRParen, stEnd };
-
- class __declspec(delphiclass) TSQLParser;
- class __declspec(pascalimplementation) TSQLParser : public System::TObject
- {
- typedef TSQLParser ThisClass;
- typedef System::TObject inherited;
-
- private:
- System::AnsiString FText;
- System::Char *FSourcePtr;
- System::Char *FTokenPtr;
- System::AnsiString FTokenString;
- TSQLToken FToken;
- TSQLToken __fastcall NextToken(void);
- System::Boolean __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 System::Boolean __fastcall EditUpdateSQL(Dbtables::TUpdateSQL *AUpdateSQL);
-
- } /* namespace Updsqled */
- #if !defined(NO_IMPLICIT_NAMESPACE_USE)
- using namespace Updsqled;
- #endif
- //-- end unit ----------------------------------------------------------------
- #endif // UpdSqlEd
-