1

Topic: Change of field BLOB

Good afternoon!
It was required to store a bit field of the big length in a DB.
Wrote UDF - to read value of bit and to install.
Bit reading to transit on hurrah.
Bit record  with an error
Invalid data type, length, or value.
function SET_BIT could not be matched.
Decided to check up UDF delivered with FIREBIRD.
update kl_value set bitset = string2blob (' sdsdsdsdsds', bitset) where did = 106
Received too most
Invalid data type, length, or value.
function STRING2BLOB could not be matched.
Prompt - where to look?
Firebird 2.5.7 Windows 10

2

Re: Change of field BLOB

bsa1959;
in Firebird 2.5 to use STRING2BLOB it and so it is normal with  works without jumps at width.  to store bit masks in BLOB a perversion any. What maximum length there can be a mask?

3

Re: Change of field BLOB

bsa1959 wrote:

Invalid data type, length, or value.
function STRING2BLOB could not be matched.
Prompt - where to look?

In the declaration f-tsii, certainly.
At which one parameter, instead of two.

4

Re: Change of field BLOB

declare external function string2blob
varchar (300) by descriptor;
blob returns parameter 2
entry_point ' string2blob ' module_name ' fbudf ';

5

Re: Change of field BLOB

bsa1959;
And ?

6

Re: Change of field BLOB

Simonov Denis;
The message entirely read, ....
Errors jumps out on my function.
String2Blob I resulted as a behavior example, is absolute  to behavior on my function....

7

Re: Change of field BLOB

hvlad;
Function String2Blob works for you?

8

Re: Change of field BLOB

bsa1959> function String2Blob works For you?
At it of one parameter, and you 2 transfer.

9

Re: Change of field BLOB

bsa1959 wrote:

hvlad;
Function String2Blob works for you?

It works for all more than 10 years smile

10

Re: Change of field BLOB

bsa1959 wrote:

It was required to store a bit field of the big length in a DB.

[VAR] CHAR CHARACTER SET OCTETS

approaches for this purpose much better.
If, of course, suffices 32

11

Re: Change of field BLOB

Gadzhimuradov Rustam;
Now all understood... Thanks.

12

Re: Change of field BLOB

hvlad;
Well and how this line to read and expose ?

13

Re: Change of field BLOB

bsa1959;

14

Re: Change of field BLOB

bsa1959 wrote:

Well and how in this line to read and expose ?

Well so UDF we are able to write?

15

Re: Change of field BLOB

What for to write UDF if is built in?

16

Re: Change of field BLOB

Gadzhimuradov Rustam;
They suit a maximum for BIGINT, and at the author bit map superlong

17

Re: Change of field BLOB

hvlad;
I.e. talk went about an overhead charge by operation with ? And a principle - same - UDF...

18

Re: Change of field BLOB

Yes. Really not  in BIGINT.
And apropos character set octets - it is necessary to think. Productivity should be above.
All thanks for councils.

19

Re: Change of field BLOB

bsa1959 wrote:

Yes. Really not  in BIGINT.

And in 3-4 BIGINT can get?

20

Re: Change of field BLOB

bsa1959 wrote:

I.e. talk went about an overhead charge by operation with ?

Bloby do not love frequent updates.

bsa1959 wrote:

And a principle - same - UDF...

too it is necessary to look At it

Evgenie wrote:

UDF I would write only for the maximum speed (not the fact that this place generally is critical)

21

Re: Change of field BLOB

Dimitry Sibiryakov;
Talk WHILE goes about 2000-3000 bits.
Because of that that WHILE it would not be desirable to disperse then these changes on 10-20 workplaces and servers.
Workplace too  on it.
This problem arose because of that that I decided to shift a part of handling on a server.

22

Re: Change of field BLOB

hvlad;
It is talk already about triple firebird. And I right at the beginning wrote - firebird 2.5.7.

23

Re: Change of field BLOB

bsa1959;
Well use stored procedures instead of storable functions

24

Re: Change of field BLOB

bsa1959 wrote:

hvlad;
It is talk already about triple firebird. And I right at the beginning wrote - firebird 2.5.7.

it is serious? Combination BIT_XXX, ASCII_XXX and SUBSTRING is about 3-ku?

25

Re: Change of field BLOB

hvlad;
I - about storable functions....