why the CLOB couldn't be inserted completely?
303154Jul 17 2002 — edited Feb 4 2003envirentment:
vc++ 6.0
database: oracle8i 8.1.7
ole provider: OraOLEDB.Oracle 8.1.7
I want to insert CLOB into oracle,but after inserted, dbms_lob.getlength(content) return the byte of the CLOB is less than original one,no error was reported in the process.for example,an article is 8k bytes long,but insert into oracle,it could be 7k or less.can anyone tell me why?help me!!!
the way i did:
connnect db...
connect string is: provider = OraOLEDB.Oracle ...
CString strCmd = "insert into t_article values (1,1,?)";
CommandPtr pCmd.CreateInstance(_uuidof(Command));
pCmd->ActiveConnection = m_pActiveConn;
ParameterPtr paraContentCont = m_pCommandCont->CreateParameter("Content",adLongVarChar,adParamInput,NEWSCONTENTLEN,_variant_t("null"));
TCHAR tcNewsContent[8k];//an article read from file
variantt vt_content = variantt(tcNewsContent);
vt_content.ChangeType(VT_BSTR);
pCmd->Parameters->GetItem("Content")->AppendChunk(vt_content);
pCmd->Execute(NULL,NULL,adCmdText|adExecuteNoRecords);
this operation was done successfully.but in sql*plus,select dbms_lob.getlength(content) from t_article where... the value is much less than the article file.
did i do anything wrong?