Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> VARCHAR behaviour

VARCHAR behaviour

From: Programming <sysdev_at_mb.sympatico.ca>
Date: 1998/11/24
Message-ID: <365B1F0E.5CE4@mb.sympatico.ca>#1/1

I have a couple of questions regarding the use of Oracle 7.2 VARCHAR host variables in a C program on AIX/RS6000.

  1. In a cursor fetch, I must use varchar and not char in my C program. Char works sometimes, but sometimes contains garbage values. Why is this?
  2. I used strcpy as follows: STRCPY((CHAR *)VAR1.ARR,(CHAR *)VAR2.ARR); VAR2 was cursor fetched from Oracle, was null terminated, and has it's .LEN set by Oracle. VAR2 had it's .LEN set by me explicitally. In a subsequent STRCPY identical to the one above, or sometimes just for use in a "WHERE X=:VAR1" clause, I found that must explicitally set the .LEN again, even though it's value has not changed since the last set! The Oracle error I got was ORA - 01458.

Any help would be greatly appreciated. Thanx. Received on Tue Nov 24 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US