# DBtreeview and Datasets

**URL:** <https://forum.servoy.com/t/dbtreeview-and-datasets/10055>\
**Category:** Classic Servoy\
**Created:** [December 23, 2008, 1:37am UTC](https://forum.servoy.com/t/dbtreeview-and-datasets/10055 "2008-12-23T01:37:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![prj311](https://avatars.discourse-cdn.com/v4/letter/p/85f322/32.png) [@prj311](https://forum.servoy.com/u/prj311)\
**Post date:** [December 23, 2008, 1:37am UTC](https://forum.servoy.com/t/dbtreeview-and-datasets/10055/1 "2008-12-23T01:37:39Z")

</div>

Hello,  
Is it possible to use the treeview bean and bind it to a dataset rather than physical foundset ?

---

<div class="post-metadata">

**Author:** ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)\
**Post date:** [December 23, 2008, 6:25am UTC](https://forum.servoy.com/t/dbtreeview-and-datasets/10055/2 "2008-12-23T06:25:56Z")

</div>

Not as far as I know.

---

<div class="post-metadata">

**Author:** ![ROCLASI](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/roclasi/32/4371_2.png) [@ROCLASI](https://forum.servoy.com/u/ROCLASI)\
**Post date:** [December 23, 2008, 9:23am UTC](https://forum.servoy.com/t/dbtreeview-and-datasets/10055/3 "2008-12-23T09:23:19Z")

</div>

Hi Phil,

I understand you don’t want to use a foundset of any form?  
I think you have 2 options then.

First of all you can create a foundset based on a table on the fly. No need to use a foundset of any form.

```auto
var fs = databaseManager.getFoundSet('myServer', 'myTable');
fs.loadRecords("SELECT id FROM myTable WHERE myColumn=?, [myVariable]);

```

If I am not mistaken this will give you a ‘separate’ foundset. So one that is not linked to any other foundset using the same table.

Another option would be when you use 4.1 where you CAN use a dataset as datasource for a form.  
See [viewtopic.php?f=1&t=11](http://forum.servoy.com/viewtopic.php?f=1&t=11)  
After loading this you can use this forms foundset for your DBTreeView bean.

Hope this helps.
