Re: Oracle Pro*C

From: <bamon_at_ocvaxc.cc.oberlin.edu>
Date: 11 Feb 93 11:42:24 GMT
Message-ID: <1993Feb11.074224.1_at_ocvaxc.cc.oberlin.edu>


In article <25Yr03M.ca9J00_at_amdahl.uts.amdahl.com>, rtan_at_polaris.utswrk (Rick Tan) writes:
>
> EXEC SQL BEGIN DECLARE SECTION;
> char name[20];

change this to

        VARCHAR name[20];

> EXEC SQL END DECLARE SECTION;
> .
> .
> strcpy(name,"Any Valid Name");

change this to

        strcpy(name.arr,"Any Valid Name");
        name.len = strlen(name.arr);


>
> EXEC SQL INSERT INTO mytable (name) VALUES (:name);
> EXEC SQL COMMIT WORK REPLACE;
>

Then, it should work.


Jennifer R. Amon            PHONE: (216) 775-6987   
Houck Computing Center        FAX: (216) 775-8573    
Oberlin College          
Oberlin, OH 44074        INTERNET: bamon_at_ocvaxc.cc.oberlin.edu
_____________________________________________________________________
Received on Thu Feb 11 1993 - 12:42:24 CET

Original text of this message