[C++ Builder 6.0] dataclientset

Hello,

Again, I must say I am a beginner and have a lot to learn, but I have accomplished yet a DBGrid filled with data from one Table.

Now, I am looking for DBGrid, filled with data from different tables.
I have searched and think that ClientDataSet is ok to do this.

Only, I am struggling with the correct definition of the properties.

Anyone can help me in the right direction?

Thanx!

Comments

  • : Hello,
    :
    : Again, I must say I am a beginner and have a lot to learn, but I
    : have accomplished yet a DBGrid filled with data from one Table.
    :
    : Now, I am looking for DBGrid, filled with data from different tables.
    : I have searched and think that ClientDataSet is ok to do this.
    :
    : Only, I am struggling with the correct definition of the properties.
    :
    : Anyone can help me in the right direction?
    :
    : Thanx!
    :

    ClientDataSet is used when for remote servers...do you have a remote db?


    Well heres local Database configs set:
    use a TQuery as DataSet - Specify a SQL string with a JOIN. - this data is then not editable.

    TDataBase
    ->Alias (just a name youll use to connect to the datasets)
    ->FileName (the file)
    ->Driver (the driver - Jet for Access, Oracle ...)


    ----DataSet option-----

    TTable
    ->Database (the Alais of the database)
    ->TableName (The data table name - shows dropdown if the database is connected = true)

    ---or---

    TQuery
    ->Database (the Alais of the database)
    ->SqlString (Select E.*, D.Dep_Name from Employees E left outer join Departments D on E.Dep_Nr = D.Dep_Nr)

    -------------------------

    TDatasource
    ->DataSet (the TTable above)

    TDBGrid
    ->DataSource (the DataSource above)
    When you active = true the TTable it will open the db and the columns will be auto gened for you. in design time.

    So the Data Hierarchy is:

    Grid -> DataSource -> DataSet -> DataBase

    any break in the hierarchy will not show data.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion