Delphi-Kylix
  Home arrow Delphi-Kylix arrow Page 3 - Saving Files to a Database using Delphi: S...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
DELPHI-KYLIX

Saving Files to a Database using Delphi: Saving Bitmaps to a Database
By: Danish Ahmed
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 6
    2007-06-26

    Table of Contents:
  • Saving Files to a Database using Delphi: Saving Bitmaps to a Database
  • Create a new project
  • More components
  • Creating the application

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Saving Files to a Database using Delphi: Saving Bitmaps to a Database - More components


    (Page 3 of 4 )

    TADOTable TADOTable is defined as a table-type dataset for retrieving and operating on a recordset produced by a single database table. What are datasets then? Datasets are fundamental units for accessing data from the database. A dataset component represents a set of records which may belong to one particular table or be a result of a query or a stored procedure.

    Since we need access to the records of only a single table I would employ the TADOTable component because it provides direct access to all the records of the specified table. The TADOTable component can directly connect to the database using its ConnectionString property but it is always advisable to use a single Connection object to connect to the database. Further, we would also need to set the TableName property of TADOTable to point to the actual table whose recordsets we want to access. The active property of the Table component determines whether the records are available for viewing or editing. To be able to view or edit them we would have to set the active property to true during design time and call the open method during runtime.

    TDataSource A TDataSource component is an essential component in every database application and acts as an interface between the dataset and the data aware components. To display records, a data aware component's DataSource property should reference a dataset component which in turn should be linked to an active dataset.

    TDBEdit A TDBEdit component is in many ways identical to the standard TEdit component but unlike TEdit, TDBEdit is a data aware component which means it can be linked to a text field in the database. It has a few additional properties including the DataSource property and the DataField property through which it is able to retrieve and post data to database.

    TDBImage A TDBImage component is a visual data aware component that can be used to display graphical data from a BLOB field of the current dataset. Like all data aware component it needs to be linked to a DataSource and its DataField property should reference the Blob field in the database.

    TDBNavigator TDBNavigator is a database component that provides easy navigation and manipulation of records in the dataset. In fact, it handles most of the database actions including navigating the records, inserting, editing, undoing after editing, refreshing and deleting records. The DBNavigator component uses a DataSource to link to the dataset and the values in the data-aware components can be viewed and manipulated through it. In short a DBNavigator allows you to add most of the basic database operation methods in response to user events without requiring you to write a single line of code.

    The TButtonand TOpen Dialog components which I am using are standard controls and have been around for a long time, so I will just assume that you know about them and I will refrain from explaining them. The only thing worth noting is that Button1 is labeled "Load Image."

    More Delphi-Kylix Articles
    More By Danish Ahmed


     

    DELPHI-KYLIX ARTICLES

    - Loading an XML Document into the DOM
    - Delphi Wrapper Classes and XML
    - Delphi and the DOM
    - Delphi and XML
    - Internet Access: Client Service
    - Finishing the Client for an Internet Access ...
    - The Client for an Internet Access Control Ap...
    - User Management for an Internet Access Contr...
    - Important Procedures for an Internet Access ...
    - Server Code for an Internet Access Control A...
    - Constructing the Interface for an Internet A...
    - Building a Server Application for an Interne...
    - Building an Internet Access Control Applicat...
    - Client Dataset: Working with Data Packets an...
    - Using the Client Dataset in an N-Tiered Appl...







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    Stay green...Green IT