Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

WebDBMemo problem

 Post Reply Post Reply
Author
NM.Bunnig View Drop Down
New Member
New Member
Avatar

Joined: 03 Dec 2018
Posts: 19
Post Options Post Options   Quote NM.Bunnig Quote  Post ReplyReply Direct Link To This Post Topic: WebDBMemo problem
    Posted: 14 Aug 2019 at 4:48pm

As an example to connect a webcore application with a database, i have create a table in an MySQL database with only three fields per record. The first and second file are from the string type, end the third field is an text field. When i connect the browser with my server i recieve  and can view the data in JSON format. In my client app i use WebDBEdits for the first two fields, and a WebDBMemo for the third field. The WebDBEdits are showing the data correctly, but i seen no data in the WebDBMemo. Below you see an example of an record as show in the browser.

$id    1
voornaam    "John"
achternaam    "Nickname"
bijzonderheden@xdata.proxy    "persoon(1)/bijzonderheden"

I connect with the server by using the XDataWebDataSet1, XDataWebConnection1 and  WebDataSource components. For the WebDBMemo i set the following properties:
DataSource := DataModule1.WebDataSource1;
DataField := bijzonderheden

How do have to configure my application so i can see the dat in the WebDBMemo?

Back to Top
Wagner R. Landgraf View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2358
Post Options Post Options   Quote Wagner R. Landgraf Quote  Post ReplyReply Direct Link To This Post Posted: 14 Aug 2019 at 6:56pm
The memo (blob) comes as a proxy. You should download the proxy in a subsequent request.
Alternatively, you can remove the lazy flag from the mapping of bizonderheden field, this will bring the content inline in JSON.
Back to Top
NM.Bunnig View Drop Down
New Member
New Member
Avatar

Joined: 03 Dec 2018
Posts: 19
Post Options Post Options   Quote NM.Bunnig Quote  Post ReplyReply Direct Link To This Post Posted: 14 Aug 2019 at 11:04pm
Thanks for your reply.

I am new tor webprogramming, and don't now how to remove the lazy flag from the mapping of bizonderheden field.


Back to Top
Wagner R. Landgraf View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2358
Post Options Post Options   Quote Wagner R. Landgraf Quote  Post ReplyReply Direct Link To This Post Posted: 15 Aug 2019 at 12:18pm
You should open the unit that has your entity classes declared, and find the declaration of bizonderheden field. There should be an attribute there with the lazy flag, like this:

  [Column('bizonderheden', [TColumnProp.Lazy])]
  Fbizonderheden : TBlob;

and then you should set it this way:

  [Column('bizonderheden', [])]
  Fbizonderheden : TBlob;

If you still have issues, please paste the declaration of this class here and I will let you know.


Edited by Wagner R. Landgraf - 15 Aug 2019 at 12:18pm
Back to Top
NM.Bunnig View Drop Down
New Member
New Member
Avatar

Joined: 03 Dec 2018
Posts: 19
Post Options Post Options   Quote NM.Bunnig Quote  Post ReplyReply Direct Link To This Post Posted: 15 Aug 2019 at 2:19pm
Originally posted by Wagner R. Landgraf

You should open the unit that has your entity classes declared, and find the declaration of bizonderheden field. There should be an attribute there with the lazy flag, like this:

  [Column('bizonderheden', [TColumnProp.Lazy])]
  Fbizonderheden : TBlob;

and then you should set it this way:

  [Column('bizonderheden', [])]
  Fbizonderheden : TBlob;

If you still have issues, please paste the declaration of this class here and I will let you know.


test

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down