• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 189
  • Last Modified:

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.
0
chachote
Asked:
chachote
  • 4
  • 2
  • 2
  • +9
1 Solution
 
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
2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

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

Featured Post

2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

  • 4
  • 2
  • 2
  • +9
Tackle projects and never again get stuck behind a technical roadblock.
Join Now