Re: Datatype boolean Informix DB
Mike Aubury <[email protected]> Mon, 21 Dec 2020 14:41:18 +0000
| Newsgroups | gmane.comp.lang.4gl.aubit.general |
|---|---|
| Message-ID | <CAGAq4WGzyxGd7vfirEFoPLTHyvD3zLNgdz7Nnn_LtjCHOxdbnw@mail.gmail.com> |
I've committed code for
if (A4GL_isyes(acl_getenv("A4GL_BOOLTOINT"))) {
if ((idtype&DTYPE_MASK)==45) {
idtype=2;
}
}
if (A4GL_isyes(acl_getenv("A4GL_BOOLTOCHAR1"))) {
if ((idtype&DTYPE_MASK)==45) {
idtype=0;
if (idtype!=idtype) { idtype|=DTYPE_MASK; }
isize=1;
}
}
to variables_new.c
Basically - set A4GL_BOOLTOCHAR1=Y in the environment or aubitrc to
generate a char(1), use A4GL_BOOLTOINT=Y to generate an integer.
On Mon, 21 Dec 2020 at 13:52, Mike Aubury <[email protected]> wrote:
> I can - but if you assign TRUE or FALSE to it - i dont think it would work
> ?
> Are you assigning string literals in the 4gl code ?
>
>
> On Mon, 21 Dec 2020 at 13:46, Elier Tiapa <[email protected]> wrote:
>
>> The version of the Informix DB is 14.10.FC1DE and the values for the
>> booleans columns are "f" and "t" (weird, should be 0 and 1 but there are
>> "'f" and "t"), so, it should be treated as char(1), is that possible?
>> Thanks a lot.
>>
>> On Mon, Dec 21, 2020 at 9:32 AM Mike Aubury <[email protected]> wrote:
>>
>>> Looks like type ID 45 hasnt been implemented yet.
>>>
>>> I can probably "fake" it easily enough by massaging a bool to be an
>>> integer in the code ?
>>> (would allow 4gl code to assign any integer value to it)
>>>
>>> Is that sufficient?
>>>
>>> On Mon, 21 Dec 2020 at 13:12, Elier Tiapa <[email protected]> wrote:
>>>
>>>> The error is :"| Unsupported type id ()"
>>>>
>>>> On Mon, Dec 14, 2020 at 11:00 PM Elier Tiapa <[email protected]>
>>>> wrote:
>>>>
>>>>> Best regards,
>>>>>
>>>>> I am getting a compile error because a definition of a variable like a
>>>>> column from a database table with the type "boolean". The A4GL_SQLTYPE is
>>>>> setted to esql.
>>>>> There are other datatypes like lvarchar and nvarchar that don't look
>>>>> right in the table info view using adbaccess, but look ok using dbaccess.
>>>>>
>>>>> Thank you very much
>>>>>
>>>>> Elier
>>>>>
>>>>
>>>>
>>>> --
>>>> Elier Tiapa
>>>> Consultor asociado
>>>> Consultores INNOSOFT 365 C.A.
>>>> _______________________________________________
>>>> Aubit4gl-discuss mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss
>>>>
>>>
>>
>> --
>> Elier Tiapa
>> Consultor asociado
>> Consultores INNOSOFT 365 C.A.
>> _______________________________________________
>> Aubit4gl-discuss mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss
>>
>
_______________________________________________
Aubit4gl-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss