Board index » delphi » assigning values in DBGrid..

assigning values in DBGrid..

Just a quick question, I'm trying to assign values into a DBGrid (in which I
created the fieldnames for.. ) - I'm selecting one field from a SQL table
that is comma delimted and then reading the the field.  I would like to
assign certain variables from that one comma delimited field into several
fields and have them shown in a DBGrid.  Is that all possible?

thanks.

 

Re:assigning values in DBGrid..


Hello Amy,
The DBGrid has to been assigned to a TDataset.
You want to try to get the values out of 1 field and show it in several
columns in the grid.
The only thing that I know that you can do is to write sql code in which you
select the pieces from the one field
so you get a output dataset with several fields. I don't know wich SQL
database you're using but look if it
has functions like substr.

Example select substr(field,2,10) , substr(11,20) from table.

Eric ten Westenend

Amy <n...@pillarworks.com> schreef in berichtnieuws
7vcntj$22...@forums.borland.com...

Quote
> Just a quick question, I'm trying to assign values into a DBGrid (in which
I
> created the fieldnames for.. ) - I'm selecting one field from a SQL table
> that is comma delimted and then reading the the field.  I would like to
> assign certain variables from that one comma delimited field into several
> fields and have them shown in a DBGrid.  Is that all possible?

> thanks.

Re:assigning values in DBGrid..


Quote
On Fri, 29 Oct 1999 11:14:33 -0700, "Amy" <n...@pillarworks.com> wrote:
>Just a quick question, I'm trying to assign values into a DBGrid (in which I
>created the fieldnames for.. ) - I'm selecting one field from a SQL table
>that is comma delimted and then reading the the field.  I would like to
>assign certain variables from that one comma delimited field into several
>fields and have them shown in a DBGrid.  Is that all possible?

What you probably need is calculated fields. With calculated fields, you
can produce multiple columns in which you display data of your choice.

==========================================================================
Steve Koterski                  "Computers are useless. They can only give
Technical Publications          you answers."
Borland                                       -- Pablo Picasso (1881-1973)
http://www.borland.com/techpubs/delphi

Other Threads