Subject | Re: [firebird-support] UDF problem |
---|---|
Author | Martijn Tonies |
Post date | 2007-12-07T16:37:13Z |
Hi,
of the failing functions is
characterdata AND should be used in conjuction with ib_getmem (or
something like that).
You are returning a pointer to PISC_QUAD, the same as the input.
Is this even possible? Or should you allocate a TISC_Quad record?
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com
> I translated my database FireBird 1.5 to 2.0, but sometime when I usecertain functions give me error "Error reading data from the conection". One
of the failing functions is
>"error reading data from connection" means the server has crashed.
> Code function in Delphiwell, I'm not sure what's wrong, but "free_it" only applies to
>
> function fnOnlyDate(F1 : PISC_QUAD): PISC_QUAD; stdcall;
> begin
> F1.gds_quad_low := 0;
> Result := F1;
> end;
>
> Declaration function
>
> declare external function fnOnlyDate
> date returns date free_it
> entry_point 'fnOnlyDate' module_name 'X.dll';
characterdata AND should be used in conjuction with ib_getmem (or
something like that).
You are returning a pointer to PISC_QUAD, the same as the input.
Is this even possible? Or should you allocate a TISC_Quad record?
> SQL example(fnOnlyDate(CON_FECHA) = '1/1/2007')
>
> SELECT FIRST 1 CON_ID
> FROM DOC_CONSULTAS
> WHERE (CON_TIPOCONSULTA = 1) AND (CON_ESTADO > 2) AND
> (CON_PACIENTE = 1) AND (CON_ID <> 2) AND
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com