Subject | Record was not inserted |
---|---|
Author | Dion Oliphant |
Post date | 2002-09-04T08:18:56Z |
Hi,
When I insert into a Detail dataset, I get the following error:- :"Record
was not inserted" The procedure below is where the error seems to
eminate(arrows indicate the exact spot). I am using v4.2E.
SQL
====
SELECT
MEMBERID
, OPTIONID
, FUNDID
, MARKETERID
, DOI
, ACCOUNTID
, ACTN
, PAYTYPE
, PAYEEID
, PAYEEFIRSTNAME
, PAYEESURNAME
, (SELECT f.FUNDNAME
FROM FUND f
WHERE f.FUNDID=m.FUNDID)
AS THEFUNDNAME
, (SELECT o.OPTIONNAME
FROM OPTIONS o
WHERE o.OPTIONID=m.OPTIONID)
AS OPTIONNAME
, (SELECT a.FIRSTNAME ||' '|| a.SURNAME
FROM MARKETER a
WHERE a.MARKETERID=m.MARKETERID)
AS MARKETERNAME
FROM MEMBERINFUND m
WHERE (m.MEMBERID = :MEMBERID)
KeyLinks
=======
MEMBERID
FUNDID
OPTIONID
MasterLinks
=========
MEMBERID=MEMBERS.MEMBERID
MasterParamLinks
==============
MEMBERID=MEMBERS.MEMBERID
MasterSource = dsMembers
ERROR PROCEDURE(IBA_UPDATESQL.IMP)
=================
procedure TIB_UpdateSQL.SQL_Insert;
begin
with InsertDSQL do
begin
CheckTransaction( true );
API_Execute;
try
if dcfAnnounceInsert in Dataset.DMLCacheFlags then
Dataset.DoDMLCacheAnnounceItem( ditInsert );
finally
IB_Transaction.Activate;
end;
end;
end;
When I insert into a Detail dataset, I get the following error:- :"Record
was not inserted" The procedure below is where the error seems to
eminate(arrows indicate the exact spot). I am using v4.2E.
SQL
====
SELECT
MEMBERID
, OPTIONID
, FUNDID
, MARKETERID
, DOI
, ACCOUNTID
, ACTN
, PAYTYPE
, PAYEEID
, PAYEEFIRSTNAME
, PAYEESURNAME
, (SELECT f.FUNDNAME
FROM FUND f
WHERE f.FUNDID=m.FUNDID)
AS THEFUNDNAME
, (SELECT o.OPTIONNAME
FROM OPTIONS o
WHERE o.OPTIONID=m.OPTIONID)
AS OPTIONNAME
, (SELECT a.FIRSTNAME ||' '|| a.SURNAME
FROM MARKETER a
WHERE a.MARKETERID=m.MARKETERID)
AS MARKETERNAME
FROM MEMBERINFUND m
WHERE (m.MEMBERID = :MEMBERID)
KeyLinks
=======
MEMBERID
FUNDID
OPTIONID
MasterLinks
=========
MEMBERID=MEMBERS.MEMBERID
MasterParamLinks
==============
MEMBERID=MEMBERS.MEMBERID
MasterSource = dsMembers
ERROR PROCEDURE(IBA_UPDATESQL.IMP)
=================
procedure TIB_UpdateSQL.SQL_Insert;
begin
with InsertDSQL do
begin
CheckTransaction( true );
API_Execute;
>> if ( RowsAffected = 0 ) and ( InsertDSQL.StatementType = stInsert )then
>> raise EIB_DatasetError.Create( E_Record_Not_Inserted )else
try
if dcfAnnounceInsert in Dataset.DMLCacheFlags then
Dataset.DoDMLCacheAnnounceItem( ditInsert );
finally
IB_Transaction.Activate;
end;
end;
end;