Forms 4, CHAR datatypes, trailing spaces

From: Alex Long <paladin_at_along.dialix.oz.au>
Date: Mon, 06 Mar 1995 08:47:27 GMT
Message-ID: <3_at_along.dialix.oz.au>


Greetings all,

I wonder if anyone has struck this problem, and if workaround exists for it.

I am working on a database that was originally written in Informix, and then converted to RDBMS 7.

The datatypes were retained as CHAR, and not converted to VARCHAR2.

I've designed a form, using Default Blocks, and then created a dependant block, using two CHAR and one NUMBER columns, for the relationship.

The form compiled OK, but when I ran it, the detail block reported no matches, yet, when I keyed in the query in SQL*Plus, it reported 8 matching records.

Descriptive or narrative fields (Where a code has matching descriptive row in an lookup table), all failed.

I re-created the form, but did not include the relationship, and then hard coded some values into the details block (PRE-QUERY trigger), executed the query, there were the 78 rows.

Calling another form, with a trigger, and the 3 values being assigned to :GLOBAL variables, the form executed the master block OK, with the correct values, but the detail block again failed.

I tried RTRIM(:CODE.FIELD) =RTRIM(NARRATIVE_CODE.FIELD) and got nothing.

The only conclusion I could reach was that Form4 does not like CHAR datatype. If I sent the data as a :GLOBAL variable, the trailing spaces were trimmed and it was OK, as was hard coding '6X6PARTNO', but not when the system attempted to compare two fields that were identical length, somehow, the trailing spaces caused a wrong indication.

Am I missing something vital here? Is it possible to set a relationship between two columns that are CHAR datatype?

Any help or guidance on this would be greatly appreciated.

                                   ,,,
                                  (o o)
 +----------------------------oOO--(_)--OOo------------------------------+

| paladin.along.dialix.oz.au | I wish I could of something clever |
| Alex Long | to put in this section. |
| Adelaide, South Australia | |
+-----------------------------------------------------------------------+
 + Received on Mon Mar 06 1995 - 09:47:27 CET

Original text of this message