Wierd sqlite-net pcl issue
So i made a expense tracking app and now im hooking it up to a sqlite database, but when i try to text it, it throws wierd errors:
with 3 internal errors:
38 Replies
to translate from polish:
error:
internal errors:
i would try using Microsoft.Data.Sqlite instead
is the library broken?
no, it just doesn't come with the native sqlite library
it also looks to be unmaintained
i just need it for a simple expense app for myself
what do i do to make the library work, do i just provide the ddl?
oh, i see,
sqlite-net-pcl, not sqlite-netyeah
it is probably still easierto use Microsoft.Data.Sqlite instead of debugging this problem
ill try manually inserting the ddl first
i would not try that
why?
because it is only going to cause you problems in the future
like?
what nuget package are you using here exactly?
sqlite-net-pcl 1.9.172
SQLite-net is an open source and light weight library providing easy SQLite database storage for .NET, Mono, and Xamarin applications.
This version uses SQLitePCLRaw to provide platform independent versions of SQLite.
because changing your application to release mode, or building it for a certain architecture, or just deleting your bin folder and rebuilding, will break your application and you will have to copy it again
ok
@T'tk
it will take you no more than five minutes to try using Microsoft.Data.Sqlite instead
is using that package also as easy as sqlite-net-pcl?
given the issues you've had so far, I'd say yes
what i like in the current package is that i cant just work on objects and dont have to write sql queries?
does the msc.data.sqlite package require me to write sql queries? coz i hate it
around here we'd typically recommend EF Core with the accompanying SQLite package (which uses Microsoft.Data.SQLite) to do the same thing
ef core?
https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.Sqlite/10.0.0-preview.6.25358.103
that's going to give you C# objects and the ability to write LINQ queries on your tables, so you're not writing sql queries
I don't think anyone around here has any experience with sqlite-net-pcl
ok
yes if you are using the custom ORM stuff in sqlite-net-pcl it will take more than five minutes. well, i didn't know that was a thing. sorry
Getting Started - EF Core
Getting started tutorial for Entity Framework Core
they have a good example here which uses sqlite
i moved to the library u said and the error persists
can you send your csproj file
@reflectronic
ok. is there a reason you used .NET Framework
i used it coz that's what i was tought
it worked fine before i made like 5 projects on the same setup and the sqlite worked fine
i had to move vs to a new disc coz i didnt have a lot of space on c: tho, maybe i did something wrong on setup?
right click on the packages.config file in Visual Studio and pick "Migrate to PackageReference"
and then what?
and then it will work
thx