by Antonio Ca » Fri, 12 Dec 2003 07:24:35
Please, if somebody can help myself, I thank.
I set up a relationship Master-detail with IBX + ClientDataSet in Delphi 7,
the relationship this working in the visualization but I don't get to make
Insert-delete-Update.
When I make ApplyUpdate(0), the system error create : Parameter name
expected
I describe the working environment of used test below, Components and
altered
Properties, other default
Thank you again
Antonio Carlos
Rio de Janeiro - Brasil
Create table "GGROUP" (
"GG_COD" Integer NOT NULL,
"GG_NAME" Varchar(20),
"GG_STATUS" Varchar(10),
Primary Key ("GG_COD")
);
Create table "MEMBERS" (
"M_COD" Integer,
"GG_COD" Integer NOT NULL,
"M_NAME" Varchar(50),
"M_AGE" Varchar(2),
Primary Key ("G_COD")
);
Alter table "MEMBERS" add foreign key ("GG_COD") references "GGROUP"
("GG_COD") on update cascade on delete cascade;
Form1, Form2(ReconcileErrorForm)
IBDataBase1
Name : db
SQLDialect : 3
IBTransaction1
AutoStopAction : saCommit
DefaulDatabase : db
Name : IBTrans
Params : read_committed , rec_version, nowait
IBQuery1
Database : db
Name : ibqMaster
SQL : select * from GGROUP
Transaction : IBTrans
UniDirectional : True
DataSource1
DataSet : ibqMaster
Name : dsMD
IBQuery2
Database : db
DataSource : dsMD
Name : ibqDetail
SQL : select * from MEMBERS where GG_COD = :GG_COD
Transaction : IBTrans
UniDirectional : True
DataSetProvider1
DataSet : ibqMaster
Name : DSP
UpdateMode : upWhereChange
ClientDataSet1
Name : cdsMaster
ProviderName : DSP
ClientDataSet2
DataSetField : cdsMasteribqDetail
Name : cdsDetail
Params : 0 - GG_COD
DataType : ftInteger
Name : GG_COD
ParamType : ptInput
DataSource 2
DataSet : cdsMaster
name : dsMaster
DataSouce 3
SataSet : cdsDetail
name : dsDetail
DBGrid1
DataSource : dsMaster
DBNavigator1
DataSource : dsMaster
DBGrid2
DataSource : dsDetail
DBNavigator2
DataSource : dsDetail
procedure TForm1.FormActivate(Sender: TObject);
begin
db.Connected := True;
cdsMaster.Open;
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
db.Connected := False;
cdsMaster.Close;
end;
procedure TForm1.cdsMasterReconcileError(DataSet: TCustomClientDataSet;
E: EReconcileError; UpdateKind: TUpdateKind;
var Action: TReconcileAction);
begin
Action := HandleReconcileError(DataSet,UpdateKind,E);
end;
procedure TForm1.cdsMasterAfterPost(DataSet: TDataSet);
begin
cdsMaster.ApplyUpdates(0);
cdsMaster.Refresh;
end;
procedure TForm1.cdsMasterAfterDelete(DataSet: TDataSet);
begin
cdsMaster.ApplyUpdates(0);
cdsMaster.Refresh;
end;
"Bill Todd (TeamB)" < XXXX@XXXXX.COM > escreveu na mensagem
in