Subject Re: [firebird-support] UDF Problem
Author Robert Tulloch
Hi:

Thanks.

I tried your suggestion and it still causes the disconnect. I am using
IB running as a service. I built the dll into the IB udf directory with
debugging
but cannot get this to work. I have used the run parameters when testing
with test programs before and it works fine.

Are you saying that run with IBServer.exe (shut down first) should start
IBServer? Doesn't seem to for IBConsole indicates server not started.

Can you give me some more clarification on exactly what you mean here?

Best regards

Kevin Day Programming wrote:

> {*** need to check here again for end of string - could be a part of the
>problem***}
> if (i < Len) then
> > szSource[i] := UpCase(szSource[i]); {Catch the next first letter
>and
>
>
>>uppercase it}
>>
>>
> else
> szResult^ := #0;
>
>
>> end;
>>end;
>>
>>
>>exports
>> fn_ProperCaseString;
>>begin
>>end.
>>
>>
>
>
>Also I assume you are declaring it within firbird such as
>
>

This is what I have been using.

>DECLARE EXTERNAL FUNCTION PROPERCASESTRING
> CSTRING(80), CSTRING(80)
> RETURNS PARAMETER 2
>ENTRY_POINT 'fn_ProperCaseString' MODULE_NAME 'strudf';
>
>
>Also be sure to check that the string you are passing is <= to the declared
>length - 80 in this case.
>
>
Yes for testing.

>
>Finally if the IDE you are using for this piece of code allows I suggest you
>trace through it. If you put a break point on the first line and check that
>the input parameter holds what is expected. If it doesn't you know straight
>away you've got a problem with your declarations or calling mechanism. From
>code snippets I've seen both stdcall and cdecl in use, although I use cdecl.
>
>To debug a dll in delphi (and I assume kylix) you tell it what the host
>application is. For testing / debugging, install a copy of
>interbase/firebird on your local development computer. I use super server
>so I set the host application to be fbserver.exe (or ibserver.exe). Making
>sure that firebird wasn't previously running (shut the service down if
>running as an application). Run the dll from within delphi and the server
>will be launched in application mode under delphi control. Log in to a
>local database using ibconsole or whatever program and execute your test
>query. Delphi will stop at the breakpoint and you can take a look at what
>is happening.
>
>Hope this helps.
>
>Kevin Day
>
>
>



[Non-text portions of this message have been removed]