LoadBlobFromFile takes only a single parameter and returns a blob
This commit is contained in:
parent
9746ae578d
commit
c8fb94b176
@ -19,9 +19,8 @@ grant execute on function flagged to public;
|
||||
|
||||
|
||||
create or alter function LoadBlobFromFile (
|
||||
afilename varchar(8191),
|
||||
ablob BLOB
|
||||
) returns bigint
|
||||
afilename varchar(8191)
|
||||
) returns BLOB
|
||||
external name 'MyFirstUDRKit!MFK_LoadBlobFromFile!Load file and save to Blob'
|
||||
engine udr;
|
||||
grant execute on function LoadBlobFromFile to public;
|
||||
|
@ -174,11 +174,10 @@ FB_UDR_BEGIN_FUNCTION (MFK_LoadBlobFromFile)
|
||||
//BEGIN
|
||||
FB_UDR_MESSAGE(InMessage,
|
||||
(FB_VARCHAR(8191), afilename)
|
||||
(FB_BLOB, ablob)
|
||||
);
|
||||
|
||||
FB_UDR_MESSAGE(OutMessage,
|
||||
(FB_BIGINT, result)
|
||||
(FB_BLOB, ablob)
|
||||
);
|
||||
|
||||
|
||||
@ -190,8 +189,8 @@ FB_UDR_EXECUTE_FUNCTION
|
||||
{
|
||||
// Test Input
|
||||
if (in->afilenameNull != 0) {
|
||||
out->resultNull = FB_TRUE;
|
||||
out->result = 0;
|
||||
out->ablobNull = FB_TRUE;
|
||||
return;
|
||||
}
|
||||
|
||||
std::ifstream FileReader;
|
||||
|
Loading…
Reference in New Issue
Block a user