# IonicStorageModule- databaseName

**URL:** <https://forum.ionicframework.com/t/ionicstoragemodule-databasename/173688>\
**Category:** Ionic Framework\
**Created:** [September 19, 2019, 7:50am UTC](https://forum.ionicframework.com/t/ionicstoragemodule-databasename/173688 "2019-09-19T07:50:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishwas097](https://avatars.discourse-cdn.com/v4/letter/v/ce73a5/32.png) [@vishwas097](https://forum.ionicframework.com/u/vishwas097)\
**Post date:** [September 19, 2019, 7:50am UTC](https://forum.ionicframework.com/t/ionicstoragemodule-databasename/173688/1 "2019-09-19T07:50:46Z")

</div>

Hai, I am creating an ionic App. I am using IonicStorageModule. I need to rename the database Name.  
For that I can use import { IonicStorageModule } from ‘@ionic/storage’;

@NgModule({  
declarations: […],  
imports: [  
IonicStorageModule.forRoot({  
name: ‘\_\_mydb’,  
driverOrder: [‘indexeddb’, ‘sqlite’, ‘websql’]  
})  
],  
bootstrap: […],  
entryComponents: […],  
providers: […]  
})  
export class AppModule { }

In this, Instead of name: ‘\_\_mydb’ I want name : sessionStorage[‘key’]. But for the first time i am getting value Undefined.Once i reload the page I am getting actual value. Any Solution ? Thanks in Advance

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [September 19, 2019, 8:05pm UTC](https://forum.ionicframework.com/t/ionicstoragemodule-databasename/173688/2 "2019-09-19T20:05:47Z")

</div>

My initial suspicion is that this is a “[Drawing Hands](https://www.google.com/search?q=drawing+hands+escher)” situation whereby the name for the database must be available before `SessionStorage` is, so I would be surprised if this were easy. I would instead try to think of ways to avoid having to do this.

---

<div class="post-metadata">

**Author:** ![vishwas097](https://avatars.discourse-cdn.com/v4/letter/v/ce73a5/32.png) [@vishwas097](https://forum.ionicframework.com/u/vishwas097)\
**Post date:** [September 24, 2019, 5:52am UTC](https://forum.ionicframework.com/t/ionicstoragemodule-databasename/173688/3 "2019-09-24T05:52:23Z")

</div>

But i will recall the module once the sessionStorage value is updated… So may be it is not the issue.

---

<div class="post-metadata">

**Author:** ![vishwas097](https://avatars.discourse-cdn.com/v4/letter/v/ce73a5/32.png) [@vishwas097](https://forum.ionicframework.com/u/vishwas097)\
**Post date:** [October 30, 2019, 4:30am UTC](https://forum.ionicframework.com/t/ionicstoragemodule-databasename/173688/4 "2019-10-30T04:30:01Z")

</div>

I found other way rather than doing this. Thanks anyways for your suggestion.
