Link to home
Start Free TrialLog in
Avatar of chachote
chachote

asked on

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.
Avatar of inthe
inthe

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
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 !!
Hi chachote,
Do you exit your program with not normally?

Try this:

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


ASKER CERTIFIED SOLUTION
Avatar of SupWang
SupWang

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I have the same problem. It seem that's caused by debugging process. Like a transaction ... I don't know more ...
Avatar of kretzschmar
what database ?
yeh! it's true. it is Delphi safety.
Use StartTransaction, Commit or Rollback.
Hi

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

Regards, Geo
Are you using a query result in a databasegrid? Then the RequestLive property should be set to true.
Avatar of chachote

ASKER

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.
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
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.

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.

No I wasn't "re-opening" the tables, thank you anyway
You got it!!! thanks for the tip, that was it. Nothing more to say, so here's your points.
I mean SupWang got it...