<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7650.28">
<TITLE>probklems with findByID (BON2)</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<BR>
<P><FONT SIZE=2>Hi,<BR>
<BR>
I have a problem with the function findByID that throws an exception on line 50 in bonimpl.cpp.<BR>
<BR>
Currently I am using the function in order to check the current model against a backup model (XML) where I have the ID’s stored of each object. If the object is present in the current model it functions correctly, but if it is not present the exception is thrown.<BR>
<BR>
Therefore, how should I use the function?<BR>
<BR>
Example:<BR>
try<BR>
{<BR>
if(0 == project->findByID(“Id not present in the model”, true))<BR>
{<BR>
// Object with id not present<BR>
}<BR>
else<BR>
{<BR>
// Object with id present.<BR>
}<BR>
}<BR>
catch(BON::Exception& e)<BR>
{<BR>
//print error<BR>
}<BR>
<BR>
Best regards,<BR>
Jesper<BR>
</FONT>
</P>
</BODY>
</HTML>