Page 1 of 1

TrichviewEdit and blob stream

Posted: Sat Dec 23, 2006 6:47 pm
by blackbird
dobroe vremya sutok,
pojalusta podskajite kak mojno s pomoshy richviewedit zapisac Unicode tekst v bazu dannix MS SQL?
i sootvetstvenno s pomoshy richview prochitat tuje zapis?
slishal chto eto mojno prodelats s pomoshy TStream no nekak ne mogu zastavis rabotat programe normalno.
kod programi vigladet tak:

TStream *Stream;
ado->Open();
ado->Insert();

ado->FieldByName("themeid")->AsInteger=Form2->themid;
ado->FieldByName("nom")->AsInteger=questnom;
ado->FieldByName("type")->AsInteger=0;
ado->FieldByName("status")->AsInteger=1;

Stream=ado->CreateBlobStream(ado->FieldByName("text")->AsWideString,bmWrite);

quest1->SaveRVFToStream(Stream,false);

Stream->Free();
ado->Post();

Posted: Sat Dec 23, 2006 9:22 pm
by Sergey Tkachenko
(Please use English in the forum. Questions in Russian can be sent using private message or e-mail).

Your code looks correct. RVF must be written in the field.
May be this field type cannot contain binary data?