home *** CD-ROM | disk | FTP | other *** search
- TGLDBCloneRecord
- ================
-
- Version 1.0 (2 August 1998)
- Delphi 4 version
- Copyright (c) 1998 Greg Lief
-
- ----------------------------------------------------------------------------
-
- 1. Description
- 2. Installation
- 3. Properties
- 4. Events
- 5. Methods
- 6. Copyright Notice
- 7. Disclaimer
- 8. Technical Support
- 9. Revision History
- 10. Purchasing Source Code
-
- ----------------------------------------------------------------------------
-
- Description
- ===========
-
- TGLCloneRecord is a non-visual component that attaches to any dataset.
- When so attached, you can call its Execute method to automatically
- generate an exact duplicate of the current record in that dataset. You
- can customize the fields whose values should be assigned by setting the
- Fields property.
-
- You may automatically post the new record by setting the AutoPost
- property, and you can perform custom logic just prior to the post by
- providing a BeforePost event handler.
-
-
- 2. Installation
- ===============
-
- A. Choose the Component | Install Packages menu option.
-
- B. Click upon the Add Button, and select CloneRecord.BPL.
-
- C. Press OK twice.
-
- D. TGLCloneRecord will now appear in the list of design-time packages. You
- should also see a new tab entitled "Greg Lief" or "GLAD: Database", with
- the TGLCloneRecord icon upon it.
-
-
- 3. Properties
- =============
-
- AutoPost property
-
- property AutoPost : boolean ;
-
- If set to True, the Execute method will automatically post the newly
- cloned record after calling your BeforePost event handler. (The default
- value is True.)
-
-
- DataSet property
-
- property DataSet : TDataSet ;
-
- This is the dataset for which you wish to create duplicate records. When
- you assign this property, the Fields property will automatically be
- filled in with all field definitions for the dataset.
-
-
- ErrorMessage property
-
- property ErrorMessage : string ;
-
- If/when the Execute method returns False, this property will contain a
- description of the error which occurred.
-
- Notes
-
- This property is available at run-time only, and is read-only.
-
-
- property Fields : TStringList ;
-
- This allows you to customize which fields will be assigned values when
- creating the new record. By default, this will contain all field
- definitions for the attached dataset.
-
-
- 4. Events
- =========
-
- BeforePost event
-
- property BeforePost : TDataSetNotifyEvent ;
-
- If the AutoPost property is set to True, this event will be fired just
- prior to posting the newly cloned record.
-
-
- 5. Methods
- ==========
-
- Execute method
-
- function Execute ; boolean ;
-
- This will create a new record in the attached dataset, then fill in the
- specified fields based upon the values in the current record. If the
- AutoPost property is set to True, the BeforePost event handler will be
- called and the record will be posted.
-
- This method returns True if the record is successfully created. If it
- returns False, you may check the ErrorMessage property for further
- details.
-
-
- 6. Copyright Notice
- ===================
-
- This component is fully functional. My copyright notice will appear
- when you drop it upon a form at design-time, but that will not occur at
- run-time. You can remove the copyright notice by purchasing the source
- code (see item #10 below).
-
-
- 7. Disclaimer
- =============
-
- It is unfortunate that we live in a litigous society in which the
- lawyers are generally the only winners. However, that makes the
- following verbiage necessary:
-
- "THE CODE FOR THIS COMPONENT IS PROVIDED TO YOU AS IS BY ITS AUTHOR,
- GREG LIEF. THE AUTHOR HAS TESTED THE COMPONENT AND FEELS THAT IT WORKS
- AS BILLED, BUT MAKES ABSOLUTELY NO GUARANTEES OR WARRANTEES OF ANY KIND.
- IN OTHER WORDS, YOU ARE USING THIS ENTIRELY AT YOUR OWN RISK. NEITHER
- THE AUTHOR NOR ANY OTHER ORGANIZATION WILL BE HELD RESPONSIBLE FOR ANY
- DIRECT OR INDIRECT DAMAGE RESULTING FROM THE USE OF EITHER THIS
- COMPONENT OR ANY DERIVATIVES THEREOF."
-
-
- 8. Technical Support
- ====================
-
- The reason I am making this component available as freeware because I
- feel that it will be of use to other Delphi developers. However, always
- remember the old maxim "you get what you pay for". In other words, do
- not get carried away by expecting technical support, because you will be
- sadly disappointed.
-
-
- 9. Revision History
- ===================
-
- August 2, 1998 - initial public release
-
-
- 10. Purchasing Source Code
- ==========================
-
- The TGLCLoneRecord source code is available for $5 US. See the ORDER.TXT
- (included in this .ZIP file) for more details. TGLCloneRecord is also
- part of my G.L.A.D. component package, which consists of all 45+ of my
- components. For more information about G.L.A.D., visit www.greglief.com.
-