Subject | Re: UDF with string parameter in Terminal Server |
---|---|
Author | Adam |
Post date | 2007-09-18T00:56:49Z |
--- In firebird-support@yahoogroups.com, "Gustavo" <gusm@...> wrote:
DataBase and I declared the UDF with the following command:
Good!
RDB$DATABASE and it returns 'pepe'. Good!
MMPruebaString('pepe') FROM RDB$DATABASE and it returns an empty
string. THAT´S NOT GOOD!!!
through a terminal services session. All the work is being done
through fbserver.exe or fb_inet_server.exe, which is by default run as
SYSTEM.
Is it 2003 Server or something else?
Are you running Firebird as a service or application?
What user is the Firebird engine running as?
Which version of Firebird?
Are there other instances of Firebird or Interbase running on that
machine?
Maybe you can check the basics too. Try and remote desktop using the
/console option. This will let you log into the console session rather
than a virtual session so you can see if it works there. Check that
the dll you think is installed, and that the user running the firebird
engine has execute privileges to this dll.
Try out something in ib_udf that works with a string. For example.
DECLARE EXTERNAL FUNCTION substr .....
select substr('Hello World!', 2,5)
from RDB$DATABASE;
(Yes, this is a deprecated function because you now have substring
built into the engine itself, but you can test whether this really is
a terminal services issue or something about your custom dll).
Adam
>Server.
> Hello:
>
> I have a problem using an UDF with a string parameter in Terminal
>"C:\Archivos de programa\Firebird\Firebird_2_0\UDF". Then I created a
> I wrote a simple UDF in Delphi. The code is the following:
>
> function MMPruebaString(CualAlias: PChar): PChar;
> begin
> Result:=CualAlias;
> end;
>
> Then I compiled it making MMudf.dll, I copied it in the server, in
DataBase and I declared the UDF with the following command:
>SELECT MMPruebaString('pepe') FROM RDB$DATABASE and it returns 'pepe'.
> DECLARE EXTERNAL FUNCTION MMPruebaString
> CSTRING(1000)
> RETURNS CSTRING(1000) FREE_IT
> ENTRY_POINT 'MMPruebaString'
> MODULE_NAME 'MMudf';
>
>
> Then I connect to the database using IB_SQL IN THE SERVER, I execute
Good!
>LOCAL NETWORK, I execute SELECT MMPruebaString('pepe') FROM
> Then I connect to the database using IB_SQL IN A CLIENT PC ON THE
RDB$DATABASE and it returns 'pepe'. Good!
>SERVER TO THE SERVER (using LOCALHOST:), I execute SELECT
> Then I connect to the database using IB_SQL CONNECTING VIA TERMINAL
MMPruebaString('pepe') FROM RDB$DATABASE and it returns an empty
string. THAT´S NOT GOOD!!!
>We don't have any problems passing 'strings' to a UDF when connecting
> What may be the problem?
through a terminal services session. All the work is being done
through fbserver.exe or fb_inet_server.exe, which is by default run as
SYSTEM.
Is it 2003 Server or something else?
Are you running Firebird as a service or application?
What user is the Firebird engine running as?
Which version of Firebird?
Are there other instances of Firebird or Interbase running on that
machine?
Maybe you can check the basics too. Try and remote desktop using the
/console option. This will let you log into the console session rather
than a virtual session so you can see if it works there. Check that
the dll you think is installed, and that the user running the firebird
engine has execute privileges to this dll.
Try out something in ib_udf that works with a string. For example.
DECLARE EXTERNAL FUNCTION substr .....
select substr('Hello World!', 2,5)
from RDB$DATABASE;
(Yes, this is a deprecated function because you now have substring
built into the engine itself, but you can test whether this really is
a terminal services issue or something about your custom dll).
Adam