ORACLE VERSION: 8.1.7
COMPILER: Visual C++

I used a table with 3 columns: nome(varchar2),codice(number)e col_clob(CLOB). I inserted a CLOB date in a particular row and I want get this row e to print it. Look the following program:

------------------------------------------------

#include <stdio.h>
#include <sqlca.h>
#include <string.h>
#include <stdlib.h>
#include <sqlda.h>
#include <sqlcpr.h>
#include <conio.h>
#include <oci.h>

/* dichiarazione host variables */


EXEC SQL BEGIN DECLARE SECTION;

unsigned char buffer[100];
unsigned char buffer2[100];
char *user_pass="SCOTT/TIGER";
struct tab
{
char nome[20];
int codice;
}tab;

VARCHAR col_clob[100];

EXEC SQL VAR buffer IS CHAR(100);
EXEC SQL VAR buffer2 IS CHAR(100);
unsigned filelen,filelen2,offset=1;
OCIClobLocator *vclob;

EXEC SQL END DECLARE SECTION;

size_t cr;


/* parametri del file */

FILE *fp;





//////////////// Mia tabella ///////////////////
// --------------------- ------------ //
//| NOME | CODICE | + | COL_CLOB |//
// --------------------- ------------ //
////////////////////////////////////////////////

void main()
{

/* connessione al database */

EXEC SQL CONNECT :user_pass;

EXEC SQL ALLOCATE :vclob;

EXEC SQL LOB OPEN :vclob READ WRITE;

EXEC SQL SELECT col_clob
INTO :vclob
FROM tab
WHERE nome='andrea';

EXEC SQL LOB ENABLE BUFFERING :vclob;

filelen2=4294967295;

EXEC SQL LOB READ :filelen2
FROM :vclob
AT ffset
INTO :buffer2;

/* print number character read */

printf("caratteri letti:%d\n",filelen2)

/* print buffer2 content(col_clob) */
printf("COL_CLOB: %s",buffer2);

EXEC SQL LOB DISABLE BUFFERING :vclob;

EXEC SQL LOB CLOSE :vclob;

EXEC SQL FREE :vclob;

EXEC SQL COMMIT WORK RELEASE;

while(!kbhit());

}

-----------------------------------

If I executed this program I can't read the character of the CLOB. Where is the problem? Why don't the characters go in the buffer?

thanks,

Andrew