XDataWebDataSet and TBlobField

Hi,

I have a XDataWebDataSet retrieving a Text BlobField. And I can’t get the text. I have tried to declare it as a TMemoField but I still can get the text. Is there a simple way to get the text from a BlobField ?

Thanks for the help.

Using Wagner method, it works, but is there a simplest method ?

xhr: TJSXmlHttpRequest;

procedure _Load;
begin
mmo1.Lines.Text := xhr.responseText;
end;

begin
FirstLoad := True;
mmo1.Text := '';
mmo2.Text := '';
frmMain.dsVotingArea.QueryString := '$filter=(ELECTION_NUM eq '+IntToStr(frmMain.curElectionNum)

  • ' and VOTING_NUM eq '+IntToStr(idxVoting_Num[cbxVoting.ItemIndex])
  • ' and VOTING_AREA_NUM eq '+IntToStr(idxVotingArea_Num[cbxVotingArea.ItemIndex])+')'
  • '&$orderby=VOTING_AREA_NO';
    res := TAwait.ExecP(frmMain.dsVotingArea.LoadAsync);

xhr := TJSXMLHttpRequest.new;
xhr.open('GET',
frmMain.xwcSoluvote.URL + '/' +
string(TJSObject(frmMain.dsVotingArea.CurrentData)['REPART_SEAT@xdata.proxy'])
);
xhr.overrideMimeType('text/plain; charset=utf-16');
xhr.addEventListener('load', @_Load);
xhr.send;

The current way to do it is shown in the WebCoreBlob demo located in XData demos\web\blob folder.

I didn't analyze your code line by line (as it mixes unrelated stuff), but it's more or less something like that.