• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 184
  • Last Modified:

entering database data into an array

How do I create and enter data from an existing table column, into a string array?????
There are quite a few rows in the table, and entering it one-by-one would be a pain.!!
If possible, I need the Delphi code to do this.
1 Solution
Errr, simple loop will do, here in pseudocode:

for x := 0 to 10 do
  for y := 0 to 10 do
    myGrid.Cells[x,y] := dataset.getFieldByIndex(y);

For some more points.....

I sort the grid myself, after it's filled from the database (instead of a new sql with a different ORDER BY), made the grid Outlook-alike; works well.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now