Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48983

How to fix this error in Ionic SQL LITE

$
0
0

i used this function to get rows count


CountPanier() {

      return this.dbInstance.executeSql(`SELECT count(*) FROM ${this.db_table}`).then((res) => {

        this.count=res;

        return this.count;

      });

but i have this error :
2022-01-31 19:55:47.765 20966-20966/io.ionic.starter E/Capacitor/Console: File: http://localhost/vendor.js - Line 59622 - Msg: ERROR Error: Uncaught (in promise): TypeError: Cannot read properties of undefined (reading ‘executeSql’)
TypeError: Cannot read properties of undefined (reading ‘executeSql’)
at CrudService.CountPanier (http://localhost/main.js:249:32)
at HomePage.ngOnInit (http://localhost/main.js:489:19)
at callHook (http://localhost/vendor.js:55057:14)
at callHooks (http://localhost/vendor.js:55013:9)
at executeInitAndCheckHooks (http://localhost/vendor.js:54949:5)
at refreshView (http://localhost/vendor.js:63326:11)
at renderComponentOrTemplate (http://localhost/vendor.js:63465:5)
at tickRootContext (http://localhost/vendor.js:64912:5)
at detectChangesInRootView (http://localhost/vendor.js:64937:3)
at RootViewRef.detectChanges (http://localhost/vendor.js:76963:5)

how can i solve this ?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48983

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>