Solved

Whats the difference?

Posted on 1998-08-05
5
144 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Thread safe  opinion 7 126
Print Graphic and Text to Epson TM-T88v 12 184
How to renew a Delphi rad-studio licence? 5 49
Base1 Encode/Decode 3 68
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

895 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now