Subject Can not edit/remove on dataset.
Author Don Schoeman
I have two tables, the first table keeps a schedule of matches and the
second table keeps a table of teams:

/* Domain definitions */
CREATE DOMAIN "DOM_MATCH_NO" AS SMALLINT;
CREATE DOMAIN "DOM_TEAM_ID" AS CHAR(6);

/* Table: SCHEDULE, Owner: SYSDBA */
CREATE TABLE "SCHEDULE"
(
"MATCH_NO" "DOM_MATCH_NO" NOT NULL,
"OPP_TEAM_ID" "DOM_TEAM_ID" NOT NULL,
"MATCH_DATE" DATE,
"MATCH_TIME" TIME,
"COURT" INTEGER,
"PLAYED" CHAR(1) DEFAULT 'N' NOT NULL,
PRIMARY KEY ("MATCH_NO")
);
ALTER TABLE "SCHEDULE" ADD FOREIGN KEY ("OPP_TEAM_ID") REFERENCES TEAMS
("TEAM_ID");


/* Table: TEAMS, Owner: SYSDBA */
CREATE TABLE "TEAMS"
(
"TEAM_ID" "DOM_TEAM_ID" NOT NULL,
"NAME" VARCHAR(30) NOT NULL,
"GAMES_PLAYED" INTEGER,
"HIGHEST_SCORE" INTEGER,
"BEST_BATTING_SCR" INTEGER,
"BEST_BOWLING_SCR_R" INTEGER,
"BEST_BOWLING_SCR_W" INTEGER,
"MOST_WICKETS_TAKEN" INTEGER,
"LEAST_WICKETS_LOST" INTEGER,
"TOT_RUNS_MADE" INTEGER,
"TOT_RUNS_AGAINST" INTEGER,
"TOT_WICKETS_TAKEN" INTEGER,
"TOT_WICKETS_LOST" INTEGER,
PRIMARY KEY ("TEAM_ID")
);

I run a simple joint query such as this:
with ScheduleFrameQuery do
begin
KeyRelation := 'SCHEDULE';
with SQLSelect do
begin
Clear;
Add('SELECT SCHEDULE.MATCH_NO, SCHEDULE.OPP_TEAM_ID,
SCHEDULE.MATCH_DATE,');
Add(' SCHEDULE.MATCH_TIME, SCHEDULE.COURT, SCHEDULE.PLAYED,');
Add(' TEAMS.TEAM_ID, TEAMS.NAME');
end;

with SQLFrom do
begin
Clear;
Add('FROM SCHEDULE, TEAMS');
end;

with SQLWhere do
begin
Clear;
Add('WHERE SCHEDULE.OPP_TEAM_ID = TEAMS.TEAM_ID');
end;

with SQLOrder do
begin
Clear;
Add('ORDER BY SCHEDULE.MATCH_NO');
end;

with KeyLinks do
begin
Clear;
Add('TEAMS.TEAM_ID');
end;
end;

Looking at the query you will notice that the SCHEDULE.OPP_TEAM_ID field is
linked to the TEAMS.TEAM_ID field. The problem is that for some reason the
dataset only allows me to perform inserts and not edit's, or remove's. I
have temporarily hooked a TIB_UpdateBar to a datasource connected to the
ScheduleFrameQuery dataset and it also allows me to add new records, all the
other controls on the TIB_UpdateBar is disabled. Why can't I edit or remove
existing records? Any ideas? The RequestLive property for the dataset is
currently set to True.


Best Regards,
Don Schoeman