1 Reply Latest reply on Feb 28, 2012 9:39 AM by Sudheendra-Oracle

    Copy from varchar2 to into text


      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.