| View previous topic :: View next topic |
| Author |
Message |
John MacDonald Guest
|
Posted: Sun Oct 03, 2004 2:13 am Post subject: Strange behaviour - Changes in Table don't show up right awa |
|
|
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
|
|
| Back to top |
|
 |
Vladimir Stefanovic Guest
|
Posted: Sun Oct 03, 2004 8:08 am Post subject: Re: Strange behaviour - Changes in Table don't show up right |
|
|
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 <mac1 (AT) ica (DOT) net> wrote
| 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
|
|
|
| Back to top |
|
 |
John MacDonald Guest
|
Posted: Mon Oct 04, 2004 5:24 am Post subject: Re: Strange behaviour - Changes in Table don't show up right |
|
|
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" <spam (AT) not (DOT) needed> wrote
| 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 <mac1 (AT) ica (DOT) net> wrote in message
news:415f5fbb (AT) newsgroups (DOT) borland.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
|
|
|
| Back to top |
|
 |
Jayme Jeffman Filho Guest
|
Posted: Mon Oct 04, 2004 12:40 pm Post subject: Re: Strange behaviour - Changes in Table don't show up right |
|
|
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" <mac1 (AT) ica (DOT) net> escreveu na mensagem
news:415f5fbb (AT) newsgroups (DOT) borland.com...
| 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
|
|
|
| Back to top |
|
 |
Don Locke Guest
|
Posted: Mon Oct 04, 2004 9:04 pm Post subject: Re: Strange behaviour - Changes in Table don't show up right |
|
|
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
|
|
| Back to top |
|
 |
|