Solved

Whats the difference?

Posted on 1998-08-05
5
145 Views
Last Modified: 2010-04-04
Why can I modify data in an Empress database table with data aware controls i.e. DBEdit, DBMemo, but I cannot do it with code i.e. Table1.FieldByName('description').AsString := Edit1.Text;
The table is open with ReadOnly set to false.
the same thing happens with queries even when RequestLive is set to true.
I do not have this problem with Access tables.
Is there anyone else out there using Delphi 3.0 and Empress ?
0
Comment
Question by:nhoj
5 Comments
 
LVL 5

Expert Comment

by:inter
ID: 1359767
Hi, May be it is silly to ask but did you do
Table1.Edit;
..// Do your modifications
Table1.Post;

Igor
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1359768
Sorry, don't know anything of Empress... You do use Edit/post, don't you? But since you don't have problems with Access, I guess you do.
0
 
LVL 1

Author Comment

by:nhoj
ID: 1359769
From nohj
Thanks chaps that sorted the problem, but I still have never had to do this with Access. Empress is a Canadian RDBMS for UNIX, very powerful, checkout www.empress.com
0
 
LVL 1

Expert Comment

by:Greedy
ID: 1359770
The DataSet must be in edit or insert mode to change a value.  You can use this code to check the status
if MyDataSource.State in [dsEdit, dsInsert] then
  UpDateTheFieldValues;

0
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 100 total points
ID: 1359771
The table must be in edit mode (use Table1.Edit; ) and you need to post the changes (use Table1.Post).

You can check if the table is in edit mode by checking the options in the State property (eg: dsEdit and dsIsert).

There is no difference between (as far as BDE is concerned) having data aware controls modify the data and doing it directly through the code.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question