Coder Social home page Coder Social logo

Comments (7)

NathanaelA avatar NathanaelA commented on May 22, 2024

Thanks for the report; I will take a look into this; but to set your expectation it probably won't be for a while as I always prioritize my commercial customers over free support.

Also if you want to debug it and send me a pull request; I'm always glad for pull requests.

from nativescript-sqlite.

Christopotamus avatar Christopotamus commented on May 22, 2024

Have you figured this out yet @johnnyzen?

Could it be the backticks in your 'create table' string? Backticks in es6 are used for string interpolation, and I noticed some oddities with string interpolation in my own app. Maybe try building the string separately and passing it to execSQL as a parameter.

from nativescript-sqlite.

jibon57 avatar jibon57 commented on May 22, 2024

I am getting this error:

CONSOLE ERROR file:///app/services/commonServices.js:20:30: We failed to open database ReferenceError: Can't find variable: sqlite3_open_v2
CONSOLE ERROR file:///app/tns_modules/@angular/core/./bundles/core.umd.js:1091:24: ERROR Error: Uncaught (in promise): ReferenceError: Can't find variable: sqlite3_open_v2
	file:///app/tns_modules/nativescript-sqlite/sqlite.js:103:40
	ZoneAwarePromise@file:///app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js:776:37
	Database@file:///app/tns_modules/nativescript-sqlite/sqlite.js:90:23
	CommonService@file:///app/services/commonServices.js:18:19

But it's fine from Android.

from nativescript-sqlite.

dotnetdreamer avatar dotnetdreamer commented on May 22, 2024

i was having the same problem. It turns out i was missing closing ) in my sql statment. like following:
db.execSQL("CREATE TABLE IF NOT EXISTS setting (id INTEGER PRIMARY KEY AUTOINCREMENT, key TEXT, value TEXT)")

from nativescript-sqlite.

NathanaelA avatar NathanaelA commented on May 22, 2024

I have tested all the existing and new functionality in the new 2.x release. I am not able to duplicate either of these issue reported in this report.

Please note, one of the issues above is because you didn't fully rebuild the app (ios). You MUST de-install the app from the device, then do a tns platform clean ios then do a tns run ios.

from nativescript-sqlite.

richard-slabbert94 avatar richard-slabbert94 commented on May 22, 2024

Sorry to ask a question in a closed thread, but I also came across this issue with my app: "SQLITE.ExecSQL Failed Prepare: 1" with one of my insert statements.

Platform: iOS
Using the "ad-hoc" method of distribution (ie I am not using the nativescript cli)
iOS version: 12.4.7
NativeScript version: 6.7.4
nativescript-sqlite version: 2.3.3

Like you said @NathanaelA - it works fine if I uninstall the app before installing it again on the device. However, if I update the existing install without removing the app first I get that error. I don't really want to ask the users to completely uninstall the app each time they want to update, plus I am not sure if the app will pass the app store review if that is required in order for the app to function correctly.

So my question is whether there is a possible resolution to this problem in the pipeline or if there is something I can do to mitigate this? Also, most importantly, what is the reason for the need to reinstall completely?

Thank you again, @NathanaelA, for a great plugin! I hope I made myself clear?

All the best :)
Richard

from nativescript-sqlite.

richard-slabbert94 avatar richard-slabbert94 commented on May 22, 2024

Excuse me. I see it was an issue on my side. Sorry to worry you.

Thanks,
Richard

from nativescript-sqlite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.