Ayuda con este error, interbase 6 delphi 7, edicion blob

Pedro
16 de Julio del 2004
hace dias estoy tratando de editar un campo tipo Blob sub_type 1 de interbase, desde delphi he descubierto algunas cosas pero ahora me detine este error, a continuacion describo todo lo que he hecho.

si alguien conoce otra forma de hacer, por favor ayudenme.

delphi

library funcion;

uses
ShareMem,
SysUtils;

type
TGetSegmentProc = function (Handle: Pointer;
var Buffer; Size: Integer; var Read: Integer): Integer cdecl;
TPutSegmentProc = function (Handle: Pointer;
var Buffer; Size: Integer): Integer cdecl;
PBlob = ^TBlob;
TBlob = record
GetSegment: TGetSegmentProc;
Handle: Pointer;
Segments: Integer;
MaxLength: Integer;
TotalSize: Integer;
PutSegment: TPutSegmentProc;
end;

procedure Str2Text(AText: PChar; Blob: Pointer); cdecl; export;
begin
if AText <> nil then
PBlob(Blob).PutSegment(
PBlob(Blob).Handle, AText^, StrLen(AText));
end;

exports
Str2Text;
begin
end.

esto funciona, al menos compilo la dll, la puse en c:\funcion.dll

en interbase hice esto:

CREATE TABLE "test" ("TEXTO" BLOB SUB_TYPE TEXT SEGMENT SIZE 80);

DECLARE EXTERNAL FUNCTION STR2TEXT CSTRING(255) HARACTER SET NONE RETURNS BLOB ENTRY_POINT \'Str2Text\' MODULE_NAME \'c:\funcion.dll\';

INSERT INTO test (texto) VALUES (str2text(\'estoy probando\'));

y me de el siguiente error.

Dynamic SQL Error
SQL error code = -206
Column unknown
TEXTO
Statement: insert into test (texto) values (str2text(\'estoy probando\'))

y nada de nada, no se que ocurre.

gracias