Subject | Re: [ib-support] UDF Problem |
---|---|
Author | Robert F. Tulloch |
Post date | 2001-01-04T13:35:06Z |
Hi:
Thanks much.
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.
Thanks much.
> >create procedure ClearLogThis at least executes with error:
> >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
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;