# container column contents

**URL:** <https://www.dynamicsuser.net/t/container-column-contents/62978>\
**Category:** Developer Forum\
**Created:** [March 16, 2017, 6:37pm UTC](https://www.dynamicsuser.net/t/container-column-contents/62978 "2017-03-16T18:37:57Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![RT2014](https://avatars.discourse-cdn.com/v4/letter/r/b782af/32.png) [@RT2014](https://www.dynamicsuser.net/u/RT2014)\
**Post date:** [March 16, 2017, 6:37pm UTC](https://www.dynamicsuser.net/t/container-column-contents/62978/1 "2017-03-16T18:37:57Z")

</div>

Hello,

One of my Ax tables has a column of the data type container. The column name is xyzQuery. The content of this column is used to instantiate a runQuery as in the statement:

queryRun = new QueryRun(myTable.xyzQuery);

The statement executes without any problem. So, I’m guessing the content of this column is a query object. I can assign this column to a container like so:

container con;

con = myTable.xyzQuery;

In the debugger, I see that the container size is 1 and the datatype of the first element is blob.

I get a run time error (Wrong argument type) when I execute the statement:

info(strFmt(conPeek(con, 1)));

When I view the table in AX-AOT, the column is blank. If i View the table in SSMS, it is an unintelligible stream of bytes. So, how can I view the contents of this column?

Thanks.

---

<div class="post-metadata">

**Author:** ![kranthi](https://avatars.discourse-cdn.com/v4/letter/k/e480ec/32.png) [@kranthi](https://www.dynamicsuser.net/u/kranthi)\
**Post date:** [March 17, 2017, 6:39am UTC](https://www.dynamicsuser.net/t/container-column-contents/62978/2 "2017-03-17T06:39:38Z")

</div>

Use this,  
info(strFmt(’%1’, conPeek(con, 1)));

---

<div class="post-metadata">

**Author:** ![MartinDrab](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@MartinDrab](https://www.dynamicsuser.net/u/MartinDrab)\
**Post date:** [March 17, 2017, 10:42am UTC](https://www.dynamicsuser.net/t/container-column-contents/62978/3 "2017-03-17T10:42:34Z")

</div>

The content isn’t a query object, is QueryRun object’s state serialized to binary data. The bits won’t make much sense unless you deserialize the object as above.

---

<div class="post-metadata">

**Author:** ![RT2014](https://avatars.discourse-cdn.com/v4/letter/r/b782af/32.png) [@RT2014](https://www.dynamicsuser.net/u/RT2014)\
**Post date:** [March 17, 2017, 4:38pm UTC](https://www.dynamicsuser.net/t/container-column-contents/62978/4 "2017-03-17T16:38:08Z")

</div>

The debugger stops at the line

info(strFmt(’%1’, conPeek(con, 1)));

and throws an error: Wrong argument type for function.

---

<div class="post-metadata">

**Author:** ![RT2014](https://avatars.discourse-cdn.com/v4/letter/r/b782af/32.png) [@RT2014](https://www.dynamicsuser.net/u/RT2014)\
**Post date:** [March 17, 2017, 4:46pm UTC](https://www.dynamicsuser.net/t/container-column-contents/62978/5 "2017-03-17T16:46:37Z")

</div>

The typeof(conPeek(con, 1)) returns a value of 13 (blob). The question is how do I serialize the blob?

Thanks.

---

<div class="post-metadata">

**Author:** ![MartinDrab](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@MartinDrab](https://www.dynamicsuser.net/u/MartinDrab)\
**Post date:** [March 17, 2017, 9:51pm UTC](https://www.dynamicsuser.net/t/container-column-contents/62978/6 "2017-03-17T21:51:54Z")

</div>

You already have it above: _QueryRun qr = new QueryRun(myTable.xyzQuery)_.

---

<div class="post-metadata">

**Author:** ![RT2014](https://avatars.discourse-cdn.com/v4/letter/r/b782af/32.png) [@RT2014](https://www.dynamicsuser.net/u/RT2014)\
**Post date:** [March 18, 2017, 10:54pm UTC](https://www.dynamicsuser.net/t/container-column-contents/62978/7 "2017-03-18T22:54:09Z")

</div>

Thanks Martin. Yes, I already have it. I later used qr.query().datasource(1).toString(); to get the x++ query.

---

<div class="post-metadata">

**Author:** ![RT2014](https://avatars.discourse-cdn.com/v4/letter/r/b782af/32.png) [@RT2014](https://www.dynamicsuser.net/u/RT2014)\
**Post date:** [March 18, 2017, 10:54pm UTC](https://www.dynamicsuser.net/t/container-column-contents/62978/8 "2017-03-18T22:54:10Z")

</div>

Thanks Martin. Yes, I already have it. I later used qr.query().datasource(1).toString(); to get the x++ query.
