Κυριακή 4 Μαρτίου 2012

Drawing an image in a cell of a Delphi DBGrid

Designed to enable a user to view and edit data in a tabular grid, the TDBGrid component provides various ways of customizing its appearance. With so flexible component, a Delphi developer can always find new ways to make data more attractive. 

Coloring DBGrid

Adding color to your database grids will enhance the appearance and differentiate the importance of certain rows or columns within the database.

Alternate DBGrid Row Color

You've seen this surely on web pages. Alternating table row colors means displaying the first record in one color and the second record in another color and continue to alternate the color of each row displayed.
When working with datasets with many rows, alternating the background color of each row can increase readability.

Sorting records in Delphi DBGrid by Clicking on Column

How to sort records in Delphi DbGrid by clicking on the column title. plus how to change the appearance of the selected column title to reflect the sort order. Even more: how to change the cursor when moving over the DBGrid column titles.
The examples below use ADO components (AdoQuery/AdoTable connected to ADOConnection, DBGrid connected to AdoQuery over DataSource) to display the records from a database table in a DBGrid component. All the component names were left as Delphi named them when dropped on the form (DBGrid1, ADOQuery1, AdoTable1, ...).

Παρασκευή 2 Μαρτίου 2012

Create tables on MS SQL Server 2000


Learn how to Create Tables on MSSQL Server 2000 using Delphi.

Recover the ID of the last inserted row in a table (ADO)

Learn how to recover the ID of the last inserted row in a MSSQL Server Table 

Use ADO to connect to an Access Database and write a BlobStream value


Edit an inplace TMemo inside a TDBGrid


Multi select rows in a DBGrid using Shift (select as in the IE)


Load a jpeg file into a blob field using SQL

Convert a Query into a Table


Create Tables Detail/Master in Sql Server 2000 With Code


Get List of Tables in Sql Server 2000


Get List of Database in Sql Server 2000



Get List of active users in Sql Server 2000


Add a user into a database in Sql Server 2000


Delete a user's Login In Sql Server 2000


Connect To Sql Server 2000


Add a User's Login in Sql Server 2000

Adapt DateTime values for SQL-Server or Access formats


Talk to a MSAccess database thru Dot Net

Scroll within a DBGrid

Autosize a dbgrid-column to fit its contents

Make a HTML and TXT report component

Create a Dataset lookup field at runtime

Add a Row Number in your DBGrid

Get all foreignkeys in use in a given table (MS SQL Server)

Let build Windows an ADO connection string

Showing progress while loading blobs from IB/FB with IBX

Get different background color of DBGrid for odd and even rows (Another way)

Get different background color of DBGrid for odd and even rows

Create an Access Database

Create a table including an AutoInc field (ADO/MSSQL)

Color a specific (conditional) cell in a DBGrid