DataType Equivalencin

From: Mark I. Gross <mig_at_crl.com>
Date: 1996/08/02
Message-ID: <4ttn2c$6qo_at_crl.crl.com>#1/1


Being somewhat new to Oracle was wondering if anyone has used datatype equivalencing to solve the following problem. Am doing batch fetches into Pro C host array structures representing strings for the most part. As they are host array fields aggregated into a structure I can't used the varchar type. The fields in the database are VARCHAR2 and default to a blank ' ' when NULL. The host arrays are declared as 2 dimensional character arrays. They are not large strings and range between 3 to 4 characters (at least the problematic ones are). The problem is that when these fields are blank in the database the cursor fetch will blank pad the entire host array i.e. one blank stored in the database will be represented by the entire host array becoming blanked which might be up to 3 or 4 blanks. Becomes a problem when going to use the values for further selection criteria. If these character arrays are overloaded and declared to be of type string will the external data representation seen in the host arrays become the same as the internal database representation with the exception of the C null character placed on the end of the host array character field? Any help is greatly appreciated. Please respond by Email and if there is enough interest I'll post a summary. Thanks.

Mark Gross
mig_at_crl.com Received on Fri Aug 02 1996 - 00:00:00 CEST

Original text of this message