Results 1 to 2 of 2

Thread: OCI Problem

  1. #1
    Join Date
    Feb 2002

    Unanswered: OCI Problem

    OCI Problem. Not sure this is the right forum. Please let me know if there is one more suitable to OCI questions.
    I am trying to fetch a string, into a buffer, from a table with 1 row. I've thought the first column would be a string (the one with the problem) but now I'm not sure. Following is the query:

    sprintf(query, "SELECT ROWIDTOCHAR(rowid) , %s FROM %s",

    I define the buffer to be of the following type:

    static text *strrowid_buff[ARRAY_SIZE];

    I thought the following should work:
    (dvoid *)&strrowid_buff[0],
    SQLT_CHR, (dvoid *)0,
    (ub2 *)0,
    (ub2 *)0,
    (ub4)OCI_DEFAULT), oci_handle);

    I expect/hoped to get something like: "AAABBdAAHAAAABEAAA"
    just as I see in sqlplus, but he results (as seen in DevStudio debugger) are:

    0x42414141 ""

    I've tried several things but this is the best I get.
    I would appreciate a sample/correction/hints, ANYTHING!

  2. #2
    Join Date
    Feb 2002

    Talking Here is the fix

    static char strrowid_buff[ARRAY_SIZE][50];

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts