# SQLite database already open: data.db

**URL:** <https://forum.ionicframework.com/t/sqlite-database-already-open-data-db/67180>\
**Category:** ionic-v3\
**Created:** [October 17, 2016, 5:56am UTC](https://forum.ionicframework.com/t/sqlite-database-already-open-data-db/67180 "2016-10-17T05:56:45Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![richardmarais](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/richardmarais/32/101456_2.png) [@richardmarais](https://forum.ionicframework.com/u/richardmarais)\
**Post date:** [October 23, 2016, 7:21pm UTC](https://forum.ionicframework.com/t/sqlite-database-already-open-data-db/67180/22 "2016-10-23T19:21:20Z")

</div>

Thanks. Upgraded to 2.0.3, and it has the same build error:

```
ERROR in ./app/pages/chats/SqlDatabase.ts
(26,9): error TS2322: Type 'Promise<SqlResultSet>' is not assignable to type 'Promise<SqlDatabase>'.
  Type 'SqlResultSet' is not assignable to type 'SqlDatabase'.
    Property '_db' is missing in type 'SqlResultSet'.

E:\Development\IDE\ionic-apps\theWhoZoo>tsc -v
Version 2.0.3
```

---

<div class="post-metadata">

**Author:** ![richardmarais](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/richardmarais/32/101456_2.png) [@richardmarais](https://forum.ionicframework.com/u/richardmarais)\
**Post date:** [October 23, 2016, 7:37pm UTC](https://forum.ionicframework.com/t/sqlite-database-already-open-data-db/67180/23 "2016-10-23T19:37:39Z")

</div>

Got it working. Thanks.

If I define `dbPromise` as `Promise<any>` it now compiles.

`let dbPromise: Promise<any> = ...`

I appreciate the help

---

<div class="post-metadata">

**Author:** ![mirkonasato](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mirkonasato/32/131398_2.png) [@mirkonasato](https://forum.ionicframework.com/u/mirkonasato)\
**Post date:** [October 23, 2016, 7:48pm UTC](https://forum.ionicframework.com/t/sqlite-database-already-open-data-db/67180/24 "2016-10-23T19:48:23Z")

</div>

Yep that’ll do. Still not sure why you got that typescript error and I don’t, but whatever.

[Previous page](https://forum.ionicframework.com/t/sqlite-database-already-open-data-db/67180.md?page=1)
