Hello,
when inserting possibly duplicate records into a table I don't want to
check for an existing record each time before I insert but catch the
error that the insert-call throws.
The following is supposed to fill cust with two records (4711 and 4712)
and catch the error thrown on the second 4711, however it does not work.
What do I need to change?
custtable cust;
cust.setTmp();
cust.clear();
cust.AccountNum="4711";
cust.insert();
cust.clear();
cust.AccountNum="4711";
try
{
cust.insert();
}
catch (exception::Deadlock)
{
continue;
}
cust.clear();
cust.AccountNum="4712";
cust.insert();
while select cust
{
info(cust.AccountNum);
}
Stefan Osterburg
------------------------ Yahoo! Groups Sponsor --------------------~-->
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/saFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/