1 Reply Latest reply: Feb 28, 2012 3:39 AM by Sudheendra-Oracle RSS

    Copy from varchar2 to into text

    902884
      Hi

      Whats the best way to copy the contents of varchar datatype into text datatype when mixing pro *c and OCI.
      #define UNAME_LEN 30
      varchar username[UNAME_LEN];
      
      text            *uname ;
      strncpy((char *) username.arr, argv[1], UNAME_LEN);
      username.len = (unsigned short) strlen((char *) username.arr);
      
      
      strncpy (uname, username.arr,30);
      printf ("username is %s",uname);
      I am unable to copy the contents using strncpy.