Board index » cppbuilder » Strange behaviour - Changes in Table don't show up right away

Strange behaviour - Changes in Table don't show up right away


2004-10-03 10:13:46 AM
cppbuilder37
Hello folks:
When I make changes in a Table, the changes don't show up in my report until
after I turn off the software and restart.
A little confused
JMAC out
 
 

Re:Strange behaviour - Changes in Table don't show up right away

Do you use ADO or BDE ?
In what control (TDBGrid, TDBEdit, ...) you cannot see
the changes?
Have you tried Refresh() of your control?
You have to provide more concrete datails about your
problem...
Best regards,
Vladimir Stefanovic
John MacDonald < XXXX@XXXXX.COM >wrote in message
Quote
Hello folks:

When I make changes in a Table, the changes don't show up in my
report until
after I turn off the software and restart.

A little confused

JMAC out



 

Re:Strange behaviour - Changes in Table don't show up right away

Thanks for the reply Vladimir:
I am using the BDE,
I have a query linked to a table. When I change the table I have to shut
down the query and start it again before the changes in the table are
reflected.
Talk to you soon.
JMAC out
"Vladimir Stefanovic" < XXXX@XXXXX.COM >wrote in message
Quote
Do you use ADO or BDE ?

In what control (TDBGrid, TDBEdit, ...) you cannot see
the changes?

Have you tried Refresh() of your control?

You have to provide more concrete datails about your
problem...


--


Best regards,
Vladimir Stefanovic

John MacDonald < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...
>Hello folks:
>
>When I make changes in a Table, the changes don't show up in my
report until
>after I turn off the software and restart.
>
>A little confused
>
>JMAC out
>
>
>


 

{smallsort}

Re:Strange behaviour - Changes in Table don't show up right away

Hello John,
Remember that a TDataSet component hold it's data in memory so
whenever you need to show the up to date data in the database you
need to refresh the data by calling its Refresh (for TTable) or a
sequence of the Close and Open (for TQuery) methods.
Neither the components nor the database does it automatically for you.
HTH
Jayme.
"John MacDonald" < XXXX@XXXXX.COM >escreveu na mensagem
Quote
Hello folks:

When I make changes in a Table, the changes don't show up in my report
until
after I turn off the software and restart.

A little confused

JMAC out



 

Re:Strange behaviour - Changes in Table don't show up right away

You may want to include the following lines:
Table->Post();
DbiSaveChanges(Table->Handle);
Table->Refresh();
DBGrid1->Refresh(); // if you are using a grid.
The second line saves the data to the hard drive. Otherwise, it's
possible that the data won't get saved to the hard drive.
HTH,
Don