Re: Problems retrieving value fields using Pro*C with OCA

From: Michael Krolewski <vandra_at_u.washington.edu>
Date: Sat, 26 Dec 1998 16:22:37 -0800
Message-ID: <36857DCC.FCB420DA_at_u.washington.edu>


Just a guess, most languages do not directly support varchar2. In C, you need to determine the end of the string and insert a null. The remaining
space is often just gibberish. And something like printf will display the string
until the first null is encountered, which could be a ways.

I believe the varchar type has two fields -- one with the string and one with the length (len?).

I generally construct a macros to convert the varchar into a string and from the string into a varchar.

Mike Krolewski.

Mario García wrote:

> Hello,
>
> We have a software developed with Pro*C accessing data via Oracle OCA
> (Open Client Adapter) to access other non Oracle databases (i.e.
> informix).
>
> All is fine except when we try to retrieve data form varchar and
> smallint informix fields. In this situation we get the correct value +
> garbagge (strange characters). With other
> data types (i. e. char or integer) is working fine.
>
> In addition wen we develope software with dev2k 2.1 accessing data via
> OCA we
> get the correct values in all data type fields.
>
> can anyone help us?
>
> versions:
> Pro*C: 2.2.3.0.0
> OCA: 2.0.2.15.0
>
> ------------------------------------------------------------------------
>
> Mario Garcia Franco <mgarcia_at_vlc.centrisa.es>
> Cap de Projecte
> Centrisa - València
>
> Mario Garcia Franco
> Cap de Projecte <mgarcia_at_vlc.centrisa.es>
> Centrisa - València
> C/ Ricardo Micó 5 Fax: 96 346 32 33
> València Work: 96 346 32 50
> 46009 Netscape Conference Address
> Salutacions
> Additional Information:
> Last Name Garcia Franco
> First NameMario
> Version 2.1
Received on Sun Dec 27 1998 - 01:22:37 CET

Original text of this message