# 05. Troubleshooting

[![+Professional Support](https://www.totaljs.com/img/badge-support.svg)](https://www.totaljs.com/support/) [![+Chat with contributors](https://www.totaljs.com/img/badge-chat.svg)](https://messenger.totaljs.com)

__Quick navigation:__:

- [Reading a dynamic value for filtering](#)
- [How to execute stored procedure/function?](#)
- [Transactions don't work](#)

---

#### Reading a dynamic value for filtering

All data are stored in the instance of `DBMS()` and you can read some values for future filtering with `db.get(path)`.

```javascript
var db = DBMS();

db.read('users').make(function(builder) {
	builder.where('id', 100);
}).find('orders').make(function(builder) {
	builder.in('userid', db.get('users.id'));
	builder.set('orders');
}).data(function(user) {
	// user.orders will contain user orders
});
```

#### How to execute stored procedure/function?

Execution of stored procedure is very easy, you can execute `procedure` or `function` via `db.query()` method. Example:

```javascript
var db = DBMS();

db.query('call sp_something($1, $2)', ['Peter', 34]);
```

#### Transactions don't work

Transactions can be used with `Pooling`. So if you don't use pools then transactions won't work.