# How to get the ResultSet Object to the client

**URL:** <https://forum.inductiveautomation.com/t/how-to-get-the-resultset-object-to-the-client/11293>\
**Category:** 3rd Party Modules\
**Created:** [March 1, 2016, 5:17pm UTC](https://forum.inductiveautomation.com/t/how-to-get-the-resultset-object-to-the-client/11293 "2016-03-01T17:17:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![skallepalli](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@skallepalli](https://forum.inductiveautomation.com/u/skallepalli)\
**Post date:** [March 1, 2016, 5:17pm UTC](https://forum.inductiveautomation.com/t/how-to-get-the-resultset-object-to-the-client/11293/1 "2016-03-01T17:17:57Z")

</div>

I have established the connection in the gateway scope using GatewayContext context

con = context.getDatasourceManager().getConnection(“mySQL”);  
Statement stat = con.createStatement();  
rs = stat.executeQuery(“Select \* from test\_1.currency;”);

I have executed the query and now have a resultset.

I need this ResultSet Object in the Client scope to fill a table component.

How do i get a ResultSet Object in the client scope?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 2, 2016, 12:29am UTC](https://forum.inductiveautomation.com/t/how-to-get-the-resultset-object-to-the-client/11293/2 "2016-03-02T00:29:05Z")

</div>

A ResultSet object won’t work in the client – it needs its connection object. You need to process the resultset into a Dataset object, and send that to the client. Hint: look at the BasicStreamingDataset() constructors.
