I have a infoPower Grid that is bound to the TQuery Component with following sql
SELECT membership_number, message_id, msgText,target, date_time_creation,
date_time_display
FROM MessageMembership
WHERE membership_number = :membershipnumber
ORDER BY date_time_display desc
qalso I have bind it to the dbnavigator as well as DataSource which is binded with The InfoPOwer Grid. Now insert and delete and update buttons are enable but insert button dont let me type the new values also update button dnt let me type the updated value. But delete is working as expected. What can be possible issue or step I am missing?
The code for executing TQuery is :
MessageMembershipSelectQuery.ParamByName('membershipnumber').AsString :=
custQuery.FieldByName('cust_code').AsString;
MessageMembershipSelectQuery.Open;
Please help me.
TQuery
is a BDE dataset. It won´t let you edit it´s contents unless the RequestLive
property is set to True
and you have a TUpdateSQL
component bound to it, by the UpdateObject
property. Those two properties work together to enable the batch mode of BDE, which is named cached updates .
However, I strongly advise you to not invest in BDE, not even to learn how to program in Delphi. Much better is to start studing the way of TClientDataset
. It´sa much more functional dataset that will give you more control over all parts of your application, from selecting to updating data.
The nice thing about TClientDataset
is that you will isolate the SQL dependecy of your application away from the main domain logic, which will be written all around TClientDataset
. That logic will be data-dependent, not SQL-dependent.
Think about it: now you have an application that works with MySQL. Then, suddenly, you have to port it to work with Oracle. If you isolate your SQL dependency away from the main code, this refactoring will be much faster and safer.
Remember: BDE is dead .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.