You are here: Problem with CCommand::Open when query str is too long. « MsSQL Server « IT news, forums, messages
Problem with CCommand::Open when query str is too long.

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация