Subject Re: [ib-support] UDF Problem
Author Robert F. Tulloch
Hi:

Thanks much.

> >create procedure ClearLog
> >Returns(Result char(1))
> >as
> >declare variable GotIt char (1);
> >begin
> > begin
> > select BOOK from LOGCLEAR < Created table with one record "T"
> > into GotIt;
> > end
> > begin
> > Result = CLEARIBLOG(GotIt);
> > end
> >end

This at least executes with error:

Arithmetic exception, numeric overflow, or string truncation
Statement: SELECT * FROM CLEARLOG

Same thing using EXECUTE PROCEDURE CLEARLOG

Any further suggestions appreciated.

Also had to change dll:

char ClearIbLog(char *DidIt)
{
String Result;
TStringList *IBLog = new TStringList();
try
{
IBLog->LoadFromFile("..\interbase.log"); < Forgot IBLog up one from location of
dll
IBLog->Clear();
IBLog->Add(" ");
IBLog->SaveToFile("..\interbase.log");
delete IBLog;
Result = "T";
}
catch(...)
{
delete IBLog;
Result = "F";
}
return *Result.c_str();;
}




Tried using this but didn't work.
> SELECT CLEARBILOG(GotIt) FROM RDB$DATABASE INTO RESULT;