Board index » delphi » How to use tdataset instead of ttable?

How to use tdataset instead of ttable?

Hi ,

I read that using tibtable is not correct/efficient.
I should use tdataset instead of tibtable

But how can i do the next?

Table1->DataBaseName = IBDataBase1;
Table1->TableName = TBL_EMPLOYEE;
DataSource1>DataSet = Table1;
DBGrid1->DataSource = DataSource1;

OnButton1Click
Table1->Append();
Table1->FieldValues["NAME"] = "JAN";
Table1->FieldValues["AGE"] = "20";
Table1->Post();

 

Re:How to use tdataset instead of ttable?


In article <3c611bc8$1_1@dnews>, n.karade...@smart-software.org says...

Quote

> But how can i do the next?

        First, you should ask this in
borland.public.bcppbuilder.database.interbaseexpress

Quote

> Table1->DataBaseName = IBDataBase1;
> Table1->TableName = TBL_EMPLOYEE;

        With an IBDataset, you need to specify the SelectSQL, InsertSQL,
ModifySQL, DeleteSQL, and RefreshSQL.  That's a lot of SQL so there's a
wizard to do it for you.  Set the SelectSQL, right-click on the dataset,
and choose "Dataset Editor."

        The rest is all the same as with the table.

        HTH,

        -Craig

--
 Craig Stuntz (TeamB) Vertex Systems Corp. Columbus, OH
     Delphi/InterBase WebLog: http://delphi.weblogs.com
     InterBase PLANalyzer (Free IB optimization tool):
          http://delphi.weblogs.com/IBPLANalyzer

Other Threads