Re: Pro*C ANSI C Variable Length Strings

From: Thomas Hilke <Thomas.Hilke_at_dlh.de>
Date: 1998/02/26
Message-ID: <6d4ccl$5g5_at_ar4dec01.ar4.fra.dlh.de>#1/1


>
> VARCHAR oracle_string[80];
> char new_string[20];
>
> strncpy(new_string, oracle_string, oracle_string.len);
>
>Thus, you know the sizeof the oracle_string from its len field.
>

[Quoted] This is good.

But now I'm try to do this in a seperate function like "varchar_copy(´VARCHAR *source, VARCHAR *dest)" .

I have trouble with the the call of this function ( of an function that should get a pointer of VARCHAR as parameter).

[Quoted] The compiler brings up the following warnings :

>
> cc: "sample1.c", line 534: warning 604: Pointers are not
 assignment-compatible.
> cc: "sample1.c", line 534: warning 563: Argument #1 is not the correct
 type.
> cc: "sample1.c", line 534: warning 604: Pointers are not
 assignment-compatible.
> cc: "sample1.c", line 534: warning 563: Argument #2 is not the correct
 type.
> cc: warning 463: Ignoring the option '+Ostatic_prediction'; use this
 option with '+P'.
>

[Quoted] The function is defined as follows :

void varchar_copy(VARCHAR *source,VARCHAR *dest)

    {

        message("test");
    } Received on Thu Feb 26 1998 - 00:00:00 CET

Original text of this message