⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 imp_db.pas

📁 Delphi脚本控件
💻 PAS
📖 第 1 页 / 共 5 页
字号:
var H: Integer;
begin
  H := RegisterNamespace('DB', -1);
  // Begin of class EUpdateError
  RegisterClassType(EUpdateError, H);
  RegisterMethod(EUpdateError,
       'constructor Create(NativeError, Context: string;      ErrCode, PrevError: Integer; E: Exception);',
       @EUpdateError.Create);
  RegisterMethod(EUpdateError,
       'destructor Destroy; override;',
       @EUpdateError.Destroy);
  RegisterMethod(EUpdateError,
       'function EUpdateError_ReadContext:String;',
       @EUpdateError_ReadContext, Fake);
  RegisterProperty(EUpdateError,
       'property Context:String read EUpdateError_ReadContext;');
  RegisterMethod(EUpdateError,
       'function EUpdateError_ReadErrorCode:Integer;',
       @EUpdateError_ReadErrorCode, Fake);
  RegisterProperty(EUpdateError,
       'property ErrorCode:Integer read EUpdateError_ReadErrorCode;');
  RegisterMethod(EUpdateError,
       'function EUpdateError_ReadPreviousError:Integer;',
       @EUpdateError_ReadPreviousError, Fake);
  RegisterProperty(EUpdateError,
       'property PreviousError:Integer read EUpdateError_ReadPreviousError;');
  RegisterMethod(EUpdateError,
       'function EUpdateError_ReadOriginalException:Exception;',
       @EUpdateError_ReadOriginalException, Fake);
  RegisterProperty(EUpdateError,
       'property OriginalException:Exception read EUpdateError_ReadOriginalException;');
  // End of class EUpdateError
  RegisterRTTIType(TypeInfo(TFieldType));
  RegisterRTTIType(TypeInfo(TDataSetState));
  RegisterRTTIType(TypeInfo(TDataEvent));
  RegisterRTTIType(TypeInfo(TUpdateStatus));
  RegisterRTTIType(TypeInfo(TUpdateAction));
  RegisterRTTIType(TypeInfo(TUpdateMode));
  RegisterRTTIType(TypeInfo(TUpdateKind));
  // Begin of class TCustomConnection
  RegisterClassType(TCustomConnection, H);
  RegisterMethod(TCustomConnection,
       'constructor Create(AOwner: TComponent); override;',
       @TCustomConnection.Create);
  RegisterMethod(TCustomConnection,
       'destructor Destroy; override;',
       @TCustomConnection.Destroy);
  RegisterMethod(TCustomConnection,
       'procedure Open; overload;',
       @TCustomConnection.Open);
  RegisterMethod(TCustomConnection,
       'procedure Close;',
       @TCustomConnection.Close);
  RegisterMethod(TCustomConnection,
       'function TCustomConnection_ReadConnected:Boolean;',
       @TCustomConnection_ReadConnected, Fake);
  RegisterMethod(TCustomConnection,
       'procedure TCustomConnection_WriteConnected(const Value: Boolean);',
       @TCustomConnection_WriteConnected, Fake);
  RegisterProperty(TCustomConnection,
       'property Connected:Boolean read TCustomConnection_ReadConnected write TCustomConnection_WriteConnected;');
  RegisterMethod(TCustomConnection,
       'function TCustomConnection_ReadDataSets(Index: Integer):TDataSet;',
       @TCustomConnection_ReadDataSets, Fake);
  RegisterProperty(TCustomConnection,
       'property DataSets[Index: Integer]:TDataSet read TCustomConnection_ReadDataSets;');
  RegisterMethod(TCustomConnection,
       'function TCustomConnection_ReadDataSetCount:Integer;',
       @TCustomConnection_ReadDataSetCount, Fake);
  RegisterProperty(TCustomConnection,
       'property DataSetCount:Integer read TCustomConnection_ReadDataSetCount;');
  RegisterMethod(TCustomConnection,
       'function TCustomConnection_ReadLoginPrompt:Boolean;',
       @TCustomConnection_ReadLoginPrompt, Fake);
  RegisterMethod(TCustomConnection,
       'procedure TCustomConnection_WriteLoginPrompt(const Value: Boolean);',
       @TCustomConnection_WriteLoginPrompt, Fake);
  RegisterProperty(TCustomConnection,
       'property LoginPrompt:Boolean read TCustomConnection_ReadLoginPrompt write TCustomConnection_WriteLoginPrompt;');
  RegisterMethod(TCustomConnection,
       'function TCustomConnection_ReadAfterConnect:TNotifyEvent;',
       @TCustomConnection_ReadAfterConnect, Fake);
  RegisterMethod(TCustomConnection,
       'procedure TCustomConnection_WriteAfterConnect(const Value: TNotifyEvent);',
       @TCustomConnection_WriteAfterConnect, Fake);
  RegisterProperty(TCustomConnection,
       'property AfterConnect:TNotifyEvent read TCustomConnection_ReadAfterConnect write TCustomConnection_WriteAfterConnect;');
  RegisterMethod(TCustomConnection,
       'function TCustomConnection_ReadBeforeConnect:TNotifyEvent;',
       @TCustomConnection_ReadBeforeConnect, Fake);
  RegisterMethod(TCustomConnection,
       'procedure TCustomConnection_WriteBeforeConnect(const Value: TNotifyEvent);',
       @TCustomConnection_WriteBeforeConnect, Fake);
  RegisterProperty(TCustomConnection,
       'property BeforeConnect:TNotifyEvent read TCustomConnection_ReadBeforeConnect write TCustomConnection_WriteBeforeConnect;');
  RegisterMethod(TCustomConnection,
       'function TCustomConnection_ReadAfterDisconnect:TNotifyEvent;',
       @TCustomConnection_ReadAfterDisconnect, Fake);
  RegisterMethod(TCustomConnection,
       'procedure TCustomConnection_WriteAfterDisconnect(const Value: TNotifyEvent);',
       @TCustomConnection_WriteAfterDisconnect, Fake);
  RegisterProperty(TCustomConnection,
       'property AfterDisconnect:TNotifyEvent read TCustomConnection_ReadAfterDisconnect write TCustomConnection_WriteAfterDisconnect;');
  RegisterMethod(TCustomConnection,
       'function TCustomConnection_ReadBeforeDisconnect:TNotifyEvent;',
       @TCustomConnection_ReadBeforeDisconnect, Fake);
  RegisterMethod(TCustomConnection,
       'procedure TCustomConnection_WriteBeforeDisconnect(const Value: TNotifyEvent);',
       @TCustomConnection_WriteBeforeDisconnect, Fake);
  RegisterProperty(TCustomConnection,
       'property BeforeDisconnect:TNotifyEvent read TCustomConnection_ReadBeforeDisconnect write TCustomConnection_WriteBeforeDisconnect;');
  // End of class TCustomConnection
  // Begin of class TNamedItem
  RegisterClassType(TNamedItem, H);
  // CONSTRUCTOR IS NOT FOUND!!!
  // End of class TNamedItem
  // Begin of class TDefCollection
  RegisterClassType(TDefCollection, H);
  RegisterMethod(TDefCollection,
       'constructor Create(ADataSet: TDataSet; AOwner: TPersistent;      AClass: TCollectionItemClass);',
       @TDefCollection.Create);
  RegisterMethod(TDefCollection,
       'function Find(const AName: string): TNamedItem;',
       @TDefCollection.Find);
  RegisterMethod(TDefCollection,
       'procedure GetItemNames(List: TStrings);',
       @TDefCollection.GetItemNames);
  RegisterMethod(TDefCollection,
       'function IndexOf(const AName: string): Integer;',
       @TDefCollection.IndexOf);
  RegisterMethod(TDefCollection,
       'function TDefCollection_ReadDataSet:TDataSet;',
       @TDefCollection_ReadDataSet, Fake);
  RegisterProperty(TDefCollection,
       'property DataSet:TDataSet read TDefCollection_ReadDataSet;');
  RegisterMethod(TDefCollection,
       'function TDefCollection_ReadUpdated:Boolean;',
       @TDefCollection_ReadUpdated, Fake);
  RegisterMethod(TDefCollection,
       'procedure TDefCollection_WriteUpdated(const Value: Boolean);',
       @TDefCollection_WriteUpdated, Fake);
  RegisterProperty(TDefCollection,
       'property Updated:Boolean read TDefCollection_ReadUpdated write TDefCollection_WriteUpdated;');
  // End of class TDefCollection
  RegisterRTTIType(TypeInfo(TFieldAttribute));
  // Begin of class TFieldDef
  RegisterClassType(TFieldDef, H);
  RegisterMethod(TFieldDef,
       'constructor Create(Owner: TFieldDefs; const Name: string;      DataType: TFieldType; Size: Integer; Required: Boolean; FieldNo: Integer); reintroduce; overload;',
       @TFieldDef.Create);
  RegisterMethod(TFieldDef,
       'destructor Destroy; override;',
       @TFieldDef.Destroy);
  RegisterMethod(TFieldDef,
       'function AddChild: TFieldDef;',
       @TFieldDef.AddChild);
  RegisterMethod(TFieldDef,
       'procedure Assign(Source: TPersistent); override;',
       @TFieldDef.Assign);
  RegisterMethod(TFieldDef,
       'function HasChildDefs: Boolean;',
       @TFieldDef.HasChildDefs);
  RegisterMethod(TFieldDef,
       'function TFieldDef_ReadFieldClass:TFieldClass;',
       @TFieldDef_ReadFieldClass, Fake);
  RegisterProperty(TFieldDef,
       'property FieldClass:TFieldClass read TFieldDef_ReadFieldClass;');
  RegisterMethod(TFieldDef,
       'function TFieldDef_ReadFieldNo:Integer;',
       @TFieldDef_ReadFieldNo, Fake);
  RegisterMethod(TFieldDef,
       'procedure TFieldDef_WriteFieldNo(const Value: Integer);',
       @TFieldDef_WriteFieldNo, Fake);
  RegisterProperty(TFieldDef,
       'property FieldNo:Integer read TFieldDef_ReadFieldNo write TFieldDef_WriteFieldNo;');
  RegisterMethod(TFieldDef,
       'function TFieldDef_ReadInternalCalcField:Boolean;',
       @TFieldDef_ReadInternalCalcField, Fake);
  RegisterMethod(TFieldDef,
       'procedure TFieldDef_WriteInternalCalcField(const Value: Boolean);',
       @TFieldDef_WriteInternalCalcField, Fake);
  RegisterProperty(TFieldDef,
       'property InternalCalcField:Boolean read TFieldDef_ReadInternalCalcField write TFieldDef_WriteInternalCalcField;');
  RegisterMethod(TFieldDef,
       'function TFieldDef_ReadParentDef:TFieldDef;',
       @TFieldDef_ReadParentDef, Fake);
  RegisterProperty(TFieldDef,
       'property ParentDef:TFieldDef read TFieldDef_ReadParentDef;');
  RegisterMethod(TFieldDef,
       'function TFieldDef_ReadRequired:Boolean;',
       @TFieldDef_ReadRequired, Fake);
  RegisterMethod(TFieldDef,
       'procedure TFieldDef_WriteRequired(const Value: Boolean);',
       @TFieldDef_WriteRequired, Fake);
  RegisterProperty(TFieldDef,
       'property Required:Boolean read TFieldDef_ReadRequired write TFieldDef_WriteRequired;');
  // End of class TFieldDef
  // Begin of class TFieldDefs
  RegisterClassType(TFieldDefs, H);
  RegisterMethod(TFieldDefs,
       'constructor Create(AOwner: TPersistent);',
       @TFieldDefs.Create);
  RegisterMethod(TFieldDefs,
       'function AddFieldDef: TFieldDef;',
       @TFieldDefs.AddFieldDef);
  RegisterMethod(TFieldDefs,
       'function Find(const Name: string): TFieldDef;',
       @TFieldDefs.Find);
  RegisterMethod(TFieldDefs,
       'procedure Update; reintroduce;',
       @TFieldDefs.Update);
  RegisterMethod(TFieldDefs,
       'function TFieldDefs_ReadHiddenFields:Boolean;',
       @TFieldDefs_ReadHiddenFields, Fake);
  RegisterMethod(TFieldDefs,
       'procedure TFieldDefs_WriteHiddenFields(const Value: Boolean);',
       @TFieldDefs_WriteHiddenFields, Fake);
  RegisterProperty(TFieldDefs,
       'property HiddenFields:Boolean read TFieldDefs_ReadHiddenFields write TFieldDefs_WriteHiddenFields;');
  RegisterMethod(TFieldDefs,
       'function TFieldDefs_ReadItems(Index: Integer):TFieldDef;',
       @TFieldDefs_ReadItems, Fake);
  RegisterMethod(TFieldDefs,
       'procedure TFieldDefs_WriteItems(Index: Integer;const Value: TFieldDef);',
       @TFieldDefs_WriteItems, Fake);
  RegisterProperty(TFieldDefs,
       'property Items[Index: Integer]:TFieldDef read TFieldDefs_ReadItems write TFieldDefs_WriteItems;default;');
  RegisterMethod(TFieldDefs,
       'function TFieldDefs_ReadParentDef:TFieldDef;',
       @TFieldDefs_ReadParentDef, Fake);
  RegisterProperty(TFieldDefs,
       'property ParentDef:TFieldDef read TFieldDefs_ReadParentDef;');
  // End of class TFieldDefs
  RegisterRTTIType(TypeInfo(TIndexOption));
  // Begin of class TIndexDef
  RegisterClassType(TIndexDef, H);
  RegisterMethod(TIndexDef,
       'constructor Create(Owner: TIndexDefs; const Name, Fields: string;      Options: TIndexOptions); reintroduce; overload;',
       @TIndexDef.Create);
  RegisterMethod(TIndexDef,
       'procedure Assign(ASource: TPersistent); override;',
       @TIndexDef.Assign);
  RegisterMethod(TIndexDef,
       'function TIndexDef_ReadFieldExpression:String;',
       @TIndexDef_ReadFieldExpression, Fake);
  RegisterProperty(TIndexDef,
       'property FieldExpression:String read TIndexDef_ReadFieldExpression;');
  // End of class TIndexDef
  // Begin of class TIndexDefs
  RegisterClassType(TIndexDefs, H);
  RegisterMethod(TIndexDefs,
       'constructor Create(ADataSet: TDataSet);',
       @TIndexDefs.Create);
  RegisterMethod(TIndexDefs,
       'function AddIndexDef: TIndexDef;',
       @TIndexDefs.AddIndexDef);
  RegisterMethod(TIndexDefs,
       'function Find(const Name: string): TIndexDef;',
       @TIndexDefs.Find);
  RegisterMethod(TIndexDefs,
       'procedure Update; reintroduce;',
       @TIndexDefs.Update);
  RegisterMethod(TIndexDefs,
       'function FindIndexForFields(const Fields: string): TIndexDef;',
       @TIndexDefs.FindIndexForFields);
  RegisterMethod(TIndexDefs,
       'function GetIndexForFields(const Fields: string;      CaseInsensitive: Boolean): TIndexDef;',
       @TIndexDefs.GetIndexForFields);
  RegisterMethod(TIndexDefs,
       'procedure Add(const Name, Fields: string; Options: TIndexOptions);',
       @TIndexDefs.Add);
  RegisterMethod(TIndexDefs,
       'function TIndexDefs_ReadItems(Index: Integer):TIndexDef;',
       @TIndexDefs_ReadItems, Fake);
  RegisterMethod(TIndexDefs,
       'procedure TIndexDefs_WriteItems(Index: Integer;const Value: TIndexDef);',
       @TIndexDefs_WriteItems, Fake);
  RegisterProperty(TIndexDefs,
       'property Items[Index: Integer]:TIndexDef read TIndexDefs_ReadItems write TIndexDefs_WriteItems;default;');
  // End of class TIndexDefs
  // Begin of class TFlatList
  RegisterClassType(TFlatList, H);
  RegisterMethod(TFlatList,
       'constructor Create(ADataSet: TDataSet);',
       @TFlatList.Create);
  RegisterMethod(TFlatList,
       'procedure Update;',
       @TFlatList.Update);
  RegisterMethod(TFlatList,
       'function TFlatList_ReadDataSet:TDataSet;',
       @TFlatList_ReadDataSet, Fake);
  RegisterProperty(TFlatList,
       'property DataSet:TDataSet read TFlatList_ReadDataSet;');
  // End of class TFlatList
  // Begin of class TFieldDefList
  RegisterClassType(TFieldDefList, H);
  RegisterMethod(TFieldDefList,
       'function FieldByName(const Name: string): TFieldDef;',
       @TFieldDefList.FieldByName);
  RegisterMethod(TFieldDefList,
       'function Find(const Name: string): TFieldDef; reintroduce;',
       @TFieldDefList.Find);
  RegisterMethod(TFieldDefList,
       'function TFieldDefList_ReadFieldDefs(Index: Integer):TFieldDef;',
       @TFieldDefList_ReadFieldDefs, Fake);
  RegisterProperty(TFieldDefList,
       'property FieldDefs[Index: Integer]:TFieldDef read TFieldDefList_ReadFieldDefs;default;');
  RegisterMethod(TFieldDefList,
       'constructor Create(ADataSet: TDataSet);',
       @TFieldDefList.Create);
  // End of class TFieldDefList
  // Begin of class TFieldList
  RegisterClassType(TFieldList, H);
  RegisterMethod(TFieldList,
       'function FieldByName(const Name: string): TField;',
       @TFieldList.FieldByName);
  RegisterMethod(TFieldList,
       'function Find(const Name: string): TField; reintroduce;',
       @TFieldList.Find);
  RegisterMethod(TFieldList,
       'function TFieldList_ReadFields(Index: Integer):TField;',
       @TFieldList_ReadFields, Fake);
  RegisterProperty(TFieldList,
       'property Fields[Index: Integer]:TField read TFieldList_ReadFields;default;');
  RegisterMethod(TFieldList,
       'constructor Create(ADataSet: TDataSet);',
       @TFieldList.Create);
  // End of class TFieldList
  RegisterRTTIType(TypeInfo(TFieldKind));
  // Begin of class TFields
  RegisterClassType(TFields, H);
  RegisterMethod(TFields,
       'constructor Create(ADataSet: TDataSet);',
       @TFields.Create);
  RegisterMethod(TFields,
       'destructor Destroy; override;',
       @TFields.Destroy);
  RegisterMethod(TFields,
       'procedure Add(Field: TField);',
       @TFields.Add);
  RegisterMethod(TFields,
       'procedure CheckFieldName(const FieldName: string);',
       @TFields.CheckFieldName);
  RegisterMethod(TFields,
       'procedure CheckFieldNames(const FieldNames: string);',
       @TFields.CheckFieldNames);
  RegisterMethod(TFields,
       'procedure Clear;',
       @TFields.Clear);
  RegisterMethod(TFields,
       'function FindField(const FieldName: string): TField;',
       @TFields.FindField);
  RegisterMethod(TFields,
       'function FieldByName(const FieldName: string): TField;',
       @TFields.FieldByName);
  RegisterMethod(TFields,
       'function FieldByNumber(FieldNo: Integer): TField;',
       @TFields.FieldByNumber);
  RegisterMethod(TFields,
       'procedure GetFieldNames(List: TStrings);',
       @TFields.GetFieldNames);
  RegisterMethod(TFields,
       'function IndexOf(Field: TField): Integer;',
       @TFields.IndexOf);
  RegisterMethod(TFields,
       'procedure Remove(Field: TField);',
       @TFields.Remove);
  RegisterMethod(TFields,
       'function TFields_ReadCount:Integer;',
       @TFields_ReadCount, Fake);
  RegisterProperty(TFields,
       'property Count:Integer read TFields_ReadCount;');
  RegisterMethod(TFields,
       'function TFields_ReadDataSet:TDataSet;',
       @TFields_ReadDataSet, Fake);
  RegisterProperty(TFields,
       'property DataSet:TDataSet read TFields_ReadDataSet;');
  RegisterMethod(TFields,
       'function TFields_ReadFields(Index: Integer):TField;',
       @TFields_ReadFields, Fake);
  RegisterMethod(TFields,
       'procedure TFields_WriteFields(Index: Integer;const Value: TField);',
       @TFields_WriteFields, Fake);
  RegisterProperty(TFields,
       'property Fields[Index: Integer]:TField read TFields_ReadFields write TFields_WriteFields;default;');
  // End of class TFields
  RegisterRTTIType(TypeInfo(TProviderFlag));
  RegisterRTTIType(TypeInfo(TAutoRefreshFlag));
  // Begin of class TLookupList
  RegisterClassType(TLookupList, H);
  RegisterMethod(TLookupList,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -