I'm in a hurry! Guess it's easy but I need help

I'm new to DB programming and I don't know why the records don't update in the phisycal files, I mean, while I'm coding and debugging, when I run my app, everything changes from run to run. Even the DB Desktop displays the changes. But when I close Delphi, and I see the tables from another app, nothing's changed.
chachoteAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

intheCommented:
hi
do you call post or applyupdates or anything?
maybe you better explain more what your doing and what you want..

also take a look in your delphi\demos\dbdemos directory for some examples ..

Regards Barry
0
intheCommented:
btw.
if you need some examples see here:

http://delphi.miningco.com/compute/delphi/msubKBDatabase.htm
0
HamidHossainCommented:
dont forget to use :

Table1.Post;

and make sure that you have one DB file in the same folder .. you may work with delphi on another copy of the DB file !!
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

SupWangCommented:
Hi chachote,
Do you exit your program with not normally?

Try this:

procedure TForm1.Table1AfterPost(DataSet: TDataSet);
begin
     Table1.FlushBuffers;
end;


0
SupWangCommented:
----------------------------------------------------------------------
from the Delphi Help file:

FlushBuffers posts all changes that have been written to the record buffer.

procedure FlushBuffers;

Description

Call FlushBuffers to cause the dataset to post all pending changes to the database, including any cached updates. Use FlushBuffers instead of CheckBrowseMode if it is important that cached record buffers are posted.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AlphomegaCommented:
I have the same problem. It seem that's caused by debugging process. Like a transaction ... I don't know more ...
0
kretzschmarCommented:
what database ?
0
XANCommented:
yeh! it's true. it is Delphi safety.
0
PeterLarsenCommented:
Use StartTransaction, Commit or Rollback.
0
geobulCommented:
Hi

Are you sure that you see the same files with another app?

Regards, Geo
0
florisbCommented:
Are you using a query result in a databasegrid? Then the RequestLive property should be set to true.
0
chachoteAuthor Commented:
well, I haven't forgot th table.post method, but nothing happens. And I'm sure I tried to read/write exactly the same DB in other programs.
0
kretzschmarCommented:
hi chachote,

well, you never said what database you use,
therefore i guess you use paradox.

i know that this effect will be happen,
if the db-path on the clients is not exactly the same

sample
on client A the path is c:\db
on client B the path is \\ws_x\db

this will be recognized by the paradox-engine as different databases,
also if physical the paths pointed to the same dir.

do you have a configuration like this?

meikl
0
mscatenaCommented:
Chachote,

I had the same problem and I solved as follows.

It's not enought to have the "Net Dir" pointing to the same physical directory in the network, they must also contain  the same "string" (the exact value of net dir must be the same in all machines). It may not happen if:

1)You map the network directory in different ways on different machines.

2)You are running the application on the same machine that the database is in.

To solve 1), make sure that the network mapping is the same.

To solve 2), use the DOS SUBST command. You then will be able to "map" a directory in the same machine, something you cannot do in Windows 9X.

Hope it helps.

0
JesseJamesCommented:
I had this problem too.
You are, probably, keeping your TTables open (i.e. with Active propertives set to true) when in design time. When you ran the program you open the tables again (in the code with TableName.Open).

Those I suposed.

To solve your problem just change the property "Active" of all the TTables to false and run again.

0
chachoteAuthor Commented:
No I wasn't "re-opening" the tables, thank you anyway
0
chachoteAuthor Commented:
You got it!!! thanks for the tip, that was it. Nothing more to say, so here's your points.
0
chachoteAuthor Commented:
I mean SupWang got it...
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.