Subject | Re: [firebird-support] How to store a string in Firebird which includes #0's in it? |
---|---|
Author | Chuck Belanger |
Post date | 2018-08-04T11:05Z |
This worked beautifully. Thank you!
There was no need to change my code, simply add a new OCTETS based
Domain and change domains on the field. All the Char(0)s are stored as
0's in what looks like a HEX based number.
Chuck
On 8/4/2018 1:54 AM, Dimitry Sibiryakov sd@...
[firebird-support] wrote:
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
There was no need to change my code, simply add a new OCTETS based
Domain and change domains on the field. All the Char(0)s are stored as
0's in what looks like a HEX based number.
Chuck
On 8/4/2018 1:54 AM, Dimitry Sibiryakov sd@...
[firebird-support] wrote:
> 04.08.2018 0:49, Chuck Belanger phytotech@... [firebird-support] wrote:---
>> The above string is created and
>> stored in a string just as you see it, but how do I store it in Firebird
>> , preferably as-is in a table field?
> Use field (VAR)CHAR CHARACTER SET OCTETS. Then "just store" your string.
>
>> I have tried rawbytestring but that truncates the string at the first #0
>> character, thus losing the information in the '0' (or some other
>> character) that follows.
> It is a problem on client side, either in your program on in IBO.
>
>> My only solution right now is to create a new table in a one:many
>> relation, such that I can have more than one record per Access code.
> It would be a right solution if you made one step further and forget about bitmasks at
> all. Just keep access rights as one record per table and user:
>
> CREATE TABLE rights (user INTEGER, table INTEGER, allowed BOOLEAN)
>
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus