# Reference error: Cannot read property 'executesql' of undefined in ionic

**URL:** <https://forum.ionicframework.com/t/reference-error-cannot-read-property-executesql-of-undefined-in-ionic/146684>\
**Category:** Ionic Framework\
**Created:** [November 5, 2018, 4:34am UTC](https://forum.ionicframework.com/t/reference-error-cannot-read-property-executesql-of-undefined-in-ionic/146684 "2018-11-05T04:34:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AfifahAqilah](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/afifahaqilah/32/122485_2.png) [@AfifahAqilah](https://forum.ionicframework.com/u/AfifahAqilah)\
**Post date:** [November 5, 2018, 4:34am UTC](https://forum.ionicframework.com/t/reference-error-cannot-read-property-executesql-of-undefined-in-ionic/146684/1 "2018-11-05T04:34:06Z")

</div>

i want to save a json data (from url) into sqlite. the json data is just a example before i use a real data. i am using ionic 3 and typescripts language. i do some research and try most of the tutorial to solve this problem but it still cannot solve. hopefully u can help me to solve the problem. Thank you. here is my code.  
this is a **network-engine.ts**

```auto

this is **home.ts**

```

import { Component } from ‘@angular/core’;  
import { NavController } from ‘ionic-angular’;  
import { HttpClient } from ‘@angular/common/http’;  
import { NetworkEngineProvider } from ‘…/…/providers/network-engine/network-engine’;  
import { Platform } from ‘ionic-angular’;

@Component({  
selector: ‘page-home’,  
templateUrl: ‘home.html’  
})  
export class HomePage {

constructor(public navCtrl: NavController, public network: NetworkEngineProvider, public http:HttpClient, private platform: Platform) {

}

getServerData()  
{

```
  let url = "https://jsonplaceholder.typicode.com/posts";
  
  let serverResponse : Promise <any>;
  serverResponse = this.network.callServer(url);
  serverResponse.then(data => {
	  console.log("Save" + JSON.stringify(data));
  }).catch(err => {
  console.log("Error " + err);
  })

```

}

loadSaveData()  
{

```
  let dataResponse : Promise <any>;
  dataResponse = this.network.displayData();
  dataResponse.then(data => {
	  this.developer = data;
  })

```

}

}

```auto

this is home.html

```

 Json Parsing Basics and save Json Get Data From Server Load Data {{dev.id}} 

```auto

```

---

<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:** [November 5, 2018, 7:07am UTC](https://forum.ionicframework.com/t/reference-error-cannot-read-property-executesql-of-undefined-in-ionic/146684/2 "2018-11-05T07:07:16Z")

</div>

Your error message says “cannot read property ‘executesql’ of undefined”. Therefore the problem must lie somewhere where you are trying to access a property (presumably by calling a method) called “executesql”, and the object which you are trying to invoke it on is undefined. I do not see the string “executesql” anywhere in the code you have posted, so the problem must lie elsewhere.

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:10pm UTC](https://forum.ionicframework.com/t/reference-error-cannot-read-property-executesql-of-undefined-in-ionic/146684/3 "2021-07-19T21:10:02Z")

</div>

Closed on July 19, 2021, 9:10pm UTC


