No field contents shown in Dbgrid

Asked

Viewed 364 times

1

In a dbgrid, I want some fields to appear in the pay accounts table and the field vlparcela_parcelasapagar of the installments table payable..

So I made a Join in both tables, see the example:

SELECT p.*
      ,c.fan_clifor
      ,pp.vlparcela_parcelasapagar
  FROM contasapagar p, 1parcelasapagar pp, cli_for c, cademp e
 WHERE p.cdconta_contasapagar = pp.cdconta_contasapagar
   AND p.cod_clifor           = c.cod_clifor
   AND p.cod_emp              = e.cod_emp
   AND c.tipo_clifor          = 'F'

After I save using the POST method TClientDataset and Commit does not show the field portion value vlparcela_parcelasapagar on dbgrid.

I have to close the screen of the bills to pay and reopen it, then it shows the value...

How do I make sure that the moment I save it shows the value of the parcels field to pay???

To show on the grid I’m using Tclientdataset... When I saved, after using the POST command, I put a refresh and also put like this(but it did not help...):

cds.Close; 
cds.Open;

How could I do it? In this case there is solution??

I am using Delphi 2010, dbexpress and Firebird 2.0

  • Friend, I don’t understand some points. How do you pass the return of SQL to Clientdataset? By a Datasetprovider? Or go doing Append’s within a while?

  • The return of SQL to Clientdataset I use Datasetprovider...

  • To save the record I do so:

  • Cds.Edit; Cds.post; Cds.applyupdates(-1)

1 answer

0

Simple, after saving give the SELECT again using your Database client, dbgrid will definitely be used.

When you close the screen and open again the values appear, why you gave a SELECT in the onShow or onActive event

Browser other questions tagged

You are not signed in. Login or sign up in order to post.