| 
	
 | 
 Posted by TheOne on 12/20/06 09:08 
I'm using OLE DB model to insert long texts into ntext field. 
My code looks like : 
 
== 
BOOL COleDBRowData::Execute(CString strSQL) 
{ 
	if(!m_bIsOpen) 
		return FALSE; 
 
	CCommand<CNoAccessor, CNoRowset>	rs; 
 
	HRESULT hr = rs.Open(m_session, strSQL); 
 
	if(FAILED(hr)) 
		return FALSE; 
 
	rs.Close(); 
	return TRUE; 
} 
== 
When strSQL length is over 5127XX bytes, Open function fails. Is the 
function supposed to be so? Is there any suggestion that I can avoid 
this failure? I'm new to OLE DB thing. 
 
What is better is if somebody can tell me SQL command to insert a whole 
text file content into the field directly. The sql command that I'm 
currently using is 
== 
 INSERT INTO MyTable(Idx, Value) Values(N'{index}', N'{loooooong 
text}') 
== 
 
Please help this poor soul. Thanks. 
 
-- 
Daewon YOON
 
  
Navigation:
[Reply to this message] 
 |