479 questions
1
vote
0
answers
67
views
Microsoft.EntityFrameworkCore.Sqlite TOP and LIMIT SQL syntax error
In Entity Framework Core 9.0.9, the query builder fails with SQLite Syntax
builder.Services.AddDbContext<MyDbContext>(fun options ->
options.UseSqlite(connectionString) |> ignore
It ...
0
votes
0
answers
80
views
Unable to run SQLite-net on Mac catalyst in release mode, works fine in debug
I have a UNO platform application that is trying to use SQLite-net-pcl. While this seems to work fine in iOS in release mode in MacCatalyst in release mode i get the following error
I am trying to ...
3
votes
1
answer
795
views
.NET MAUI Entity Framework Core migration Issue when add new Tables and Rename
Here is necessary code segments in my program. My .NET project is .NET MAUI multiproject application. It has different projects for different platforms; WinUI, iOS, Maccatalyst, and Android too.
I'm ...
0
votes
0
answers
70
views
Sqlite is not saving new items after POST Request through ASP.NET Core
I've configured the ASP.NET Core Web API using controller to use Sqlite as the database, and after the request of adding new item, the item is not being saved to the database.
The POST request ...
0
votes
2
answers
611
views
SQLite Exception on .net MAUI : no such table: matches
I'm trying to create a counter for a card game, and I'm trying to store the "Matches" with the points on a Database. I have installed the nuget package sqlite-net-pcl, and I'm getting the ...
0
votes
0
answers
269
views
Conflict between .NET Maui permissions and sqlite-net-pcl?
I am an amateur, trying to write an app that uses a sqlite database. I want the app to have read/write access to the Documents folder on my Android phone. However, I am having trouble with read/write ...
0
votes
0
answers
113
views
SQLite several tables with same data type?
Currently when I insert a new object in my database, it goes to the same table based on the data type.
For example:
sqlDatabase.Insert(myObject); // -> goes to MyObject table.
Is it possible to ...
2
votes
4
answers
1k
views
SQLite cannot apply aggregate operator 'Sum' on expressions of type 'decimal'. Using LINQ to Objects to aggregate the results on the client side
Running the following code, there is an error in the OrdersPrice=g. Sum (p=>p.TotalPrice) line, Why?
I want to query the sales data of the corresponding Managers for Orders within the past month, ...
0
votes
1
answer
63
views
Clubbing multiple sqlite statements in a single query
I have a following table:
folderId
folderPath
1
"C:\Users\obama"
2
"C:\Users\biden"
Here, folderId is an autoincrement key.
Now, insertion into the table has following steps:
a)...
1
vote
0
answers
757
views
.NET MAUI Application hangs on CreateTableAsync
I have been following this tutorial to implement SQLite-net into my MAUI application. Whenever the program executes "await db.CreateTableAsync<Restroom>();", the whole application ...
0
votes
1
answer
43
views
Select from 2 tables with count()
Dictionary table:
ID
Name
1
English
2
Italian
Word table references DictionaryID:
ID
DictionaryId
Word
1
1
A
2
1
B
3
2
C
I want to achieve a single query with a left join between Dictionary and Word ...
1
vote
1
answer
201
views
SQLite database backup ASP.NET Core file locked
I have an ASP.NET Core 6 application that uses SQLite. I have a recurring Hangfire job that I'd like to use to back up the database using the online backup API of SQLite. Finally, I'd like to upload ...
3
votes
0
answers
612
views
SQLite Database editor for App Development
I am working with a SQLite3 Database in my .NET MAUI App. The App is running on Pixel 5 - API 33 (Android 13.0 - API 33)-Emulator right now.
Right now, I am doing my SELCT-Statements to verify my ...
0
votes
1
answer
187
views
How To Read and Write Records In SQLite Using SQLite Net Extensions?
Here is the documentation I've looked at and may be helpful: Sample SQLite OneToMany Unit Test and General Read and Write Documentation in Readme
My use-case is that I've already inserted an Item and ...
0
votes
1
answer
228
views
MenuItem is not working in Android - Xamarin C#
As you can see, menu item is working properly in iOS but it's not working in android. this is my code and output :
code :
<?xml version="1.0" encoding="UTF-8" ?>
<...
5
votes
3
answers
4k
views
Where to put database initialisation code in Maui App
I have created a .net standard class library service for accessing a sqlite database in my new Maui app. My question is where to call the initialisation code. I've added the DI registration in ...
0
votes
0
answers
605
views
Writing a generic CRUD method that works regardless of type
I have an SQLite database and 5 classes/data-types (for this example I'm only going to use two of them: expense and category) and a DatabaseService that takes care of adding, deleting, updating and ...
1
vote
1
answer
41
views
Log4Net is writing "Invalid Date" to logs in Australia
For security reasons, we are not allowed to have our log4net use any external config files (like app.config), so everything has to be coded internally.
We are using log4net to write logs to an SQLite ...
0
votes
1
answer
191
views
Xamarin Forms save the state of a switch on a prebuilt sqlite database
Ok so my app has a mini problem that I don't know how to save the state of a switch with my prebuilt database (the point is to have a lost of objects and the user can click the switch to mark that ...
0
votes
1
answer
2k
views
Sqlite sync and async together
Is it good practice to use sqlite sync and async together.
Example i need on create method to use sqlite sync but in other thread to update another table async.
public class DatabaseHelper
{
...
0
votes
1
answer
392
views
How do I Sum a List from SQLite database
I'm trying to print the sum of the score numbers from the database to Label, but I can't get it up and running.
I use Entry as input for the score and names and then a button function to store them ...
10
votes
2
answers
4k
views
libSQLite.Interop not found Mac OS | M1
I am using dotnet 6 on a M1 Pro, and am struggling to use the SQLite-Package.
System.DllNotFoundException: Unable to load shared library 'SQLite.Interop.dll' or one of its dependencies.
This is the ...
0
votes
0
answers
102
views
Using custom methods with SQlite.NET Filter predicates
We are using SQLite.NET (1.5.231) in a Xamarin project
We execute Get queries like this
var result = await db.Table<T>().Where(query).ToListAsync();
Where db is a SQLiteAsyncConnection and ...
3
votes
1
answer
3k
views
SqliteException (0x80004005): SQLite Error 6: database table is locked - in-memory database with one writer thread and many query threads
I have a .NET server application running on RHEL (don't ask...) using SQLite as an in-memory database.
A single writer thread is updating a bunch of tables using an explicit transaction with external ...
0
votes
1
answer
448
views
Generic class method using SQLite-Net
I am trying to write a generic method to get the data from tables.
I am using sqlite-net ORM.
My methods compile well for delete:
public bool DeleteItem<T>(T NewItem)
{
SQLiteConnection conn ...