95,081 questions
-2
votes
0
answers
27
views
sqlite3.OperationalError because Python thinks my table name is a column [duplicate]
I am trying to access the table in my game which is called tbl[savename]. But it thinks my table name is a column.
My code is:
def save_data(self, data):
conn = sqlite3.connect("dbInfo.db&...
Best practices
0
votes
0
replies
30
views
How can I set up an ETL process for DataFrames (dbt or alternative tools)?
Question: I'm currently working on a dashboard prototype and storing data from a 22-page PDF document as 22 separate DataFrames. These DataFrames should undergo an ETL process (especially data type ...
Advice
0
votes
5
replies
96
views
Understanding Dataset Controls in Delphi While Using SQLite
My Delphi application uses SQLite for its database. My understanding is that the database connection control TFDConnection has a default row count of 50 records. If true, there should only be 50 ...
2
votes
0
answers
69
views
Linking custom sqlite when building python
I am trying to link a custom version of sqlite3 when building python, but there is an error when compiling python :
/usr/bin/install: cannot stat 'Modules/_sqlite3.cpython-313-x86_64-linux-gnu.so': No ...
1
vote
1
answer
98
views
'SQLite Error 19: 'FOREIGN KEY constraint failed'.' while try to insert data
I am trying to run my database code, but I keep getting this error and I've done whatever I can think of to fix it, whether it is random posts, or chatgpt, but I can't seem to figure it out. The ...
1
vote
0
answers
78
views
Heavy duplication when upserting with GORM generics in SQLite
I have several models in my application, which have associations between each other. I'm trying to recursively upsert them, but haven't been able to find a good solution that doesn't extensively rely ...
2
votes
1
answer
63
views
How do I make a custom field output different datatypes depending on file asking for data?
I'm building a molecule properties displaying website using django and sqlite. The database takes a numpy array and stores it as a BLOB. Currently, it just outputs the numpy array back out when asked ...
Best practices
1
vote
4
replies
59
views
Does SQLite support calling from a TRIGGER a user-defined function that uses the WITH clause?
I have a database that implements a very simple tree structure with a table, hierarchy, which has two columns, parent and child.
CREATE TABLE hierarchy (
parent INTEGER,
child INTEGER,
...
0
votes
1
answer
111
views
Connect to SQLCipher encrypted SQLite database with Rider's built-in plugin
I'm trying to connect to my database through Rider but it doesn't work since I encrypted my database with SQLCipher. Tutorials say I should add these fields in the "Advanced" tab but that ...
Best practices
0
votes
1
replies
58
views
Best practice for localizing a large (16,000+ rows) SQLite database in android
The core of my app is an SQLite database containing over 16,000 strings.
My goal is to translate them into multiple languages in the most performant, memory-efficient, and maintainable way.
I ...
0
votes
0
answers
67
views
SqlAlchemy not using updated table name in join statement
I'm not exactly sure how to what is going on, but for our testing we rename the tables before we generate everything (ie schema.table_name is renamed to table_name_schema due to issues with how we ...
1
vote
1
answer
92
views
Can't create a Sqlite.Net In Memory Database with Shared Cache when using Dapper
How can I create an in-memory Sqlite database with shared cache?
If I use the connectionstring mentioned in MS Docs for Sqlite In-Memory
Data Source=InMemorySample;Mode=Memory;Cache=Shared
Then I ...
0
votes
0
answers
56
views
Electron Builder: Built app starts UI but server + SQLite database do not run in packaged versio
I have an Electron application that uses:
React for the frontend
Node + Express backend inside /Server
A SQLite database stored inside the same /Server folder
During development, everything works ...
Best practices
0
votes
2
replies
84
views
What is the best practices to delete outdated data from the SQLite database on the server?
I have a Golang server (pet project) and each second I add 2879 bytes of data in database. At the moment I'm about a 1GB of data. I want to cleanup the database to avoid a moment when I'm run out of ...
3
votes
1
answer
104
views
Getting SQLite Syntax Error when saving model in Sequelize.js v7
So, I'm trying to learn full stack by making a list app, and I'm using
Sequelize.js for the database. So far I've got User and List models. I
recently switched to Sequelize v7.0.0-alpha.47. I can't ...
2
votes
1
answer
85
views
How can I solve an EF Core error querying SQLite?
I just got my .Net 9 Maui app working with EF Core and SQLite. I have one row of data in the database that looks like this:
I have a simple query that runs when the app loads. The repository method ...
Advice
0
votes
3
replies
72
views
Serialization for database?
Lately I've been curious about databases so I am reading books and trying to do simple assignments to learn more about them. I read about pages which contain rows and that's all good but how do I ...
1
vote
0
answers
44
views
Appium Device Farm + Prisma (SQLite) — “The table main.Session does not exist” despite successful prisma db push
I'm trying to set up Appium Device Farm with Prisma on Windows 10, but even though Prisma generates successfully and prisma db push says the schema is in sync, the Appium plugin cannot connect to the ...
0
votes
2
answers
88
views
How do I resolve a error global::System.Diagnostics.Debugger.Break(); in a .Net Maui application
I'm trying to configure a new Maui app to use EF and Sqlite following this guide: https://learn.microsoft.com/en-us/dotnet/maui/data-cloud/database-sqlite?view=net-maui-9.0
For a long time I got an ...
0
votes
2
answers
130
views
How to ensure proper destruction order using RAII for SQLite database?
In my class which holds a SQLite database handle I have:
struct SQLitePreparedStatement
{
sqlite3_stmt* stmt = nullptr;
~SQLitePreparedStatement()
{
if (stmt)
...
0
votes
1
answer
122
views
How can I retrieve data between certain times?
My data decoded from a radio receiver is stored in tables Flights and Aircraft with a common field AircraftID to enable a JOIN. There are fields for when the radio signal starts and ends (StartTime ...
4
votes
2
answers
103
views
Does sqlite ignore WHERE clause after ON CONFLICT of UPSERT?
This is a minimal example:
CREATE TABLE t(x PRIMARY KEY,y);
INSERT INTO t VALUES (1,2);
INSERT INTO t VALUES (1,3)
ON CONFLICT(x) WHERE 0 DO UPDATE SET y = 9
ON CONFLICT DO UPDATE SET y = 10;
...
0
votes
0
answers
31
views
CapacitorSQLite “isConnection() is not implemented on Android” in Ionic v8 + Capacitor 7
I’m developing an app using Ionic v8 and Capacitor 7, and I’m trying to integrate the @capacitor-community/sqlite plugin.
However, when I run the app on an Android device, I get the following error:
...
4
votes
1
answer
141
views
How to include a recursive query in the main query?
I have a database in SQLite with these tables and columns:
Products: id, name, number, price, category_id.
Orders: id, client_id, datetime, sum.
OrderProducts: order_id, product_id, product_count.
...
4
votes
2
answers
132
views
sqlite3 shell on Windows : extra carriage returns when using output redirection
Demonstrate the issue
Let's use nvim to create a text file:
> nvim C:\temp\in-file.txt
The contents of the text file:
> Get-Content C:\temp\in-file.txt
abc
bcd
cde
Now let's create a simple ...
0
votes
1
answer
95
views
aiosqlite and managing transactions
aiosqlite's own documentation is extremely minimal so I would appreciate help from experts.
I have a chat client project and the backend is in Python/FastAPI, with all the relevant calls being async ...
0
votes
0
answers
129
views
Laravel PHPUnit test: Multiple databases issue
In my Laravel application, I have set up two databases in a single server. All specific migrations and model classes have $connection property set up to use blog instance. The app works fine, no ...
2
votes
2
answers
89
views
SQLite query to find a result using two tables which needs a match in two rows of one table
I have an SQLite database - and to simplify, it has two tables:-
recipe and ingredients.
The recipe database is comprised of
recipeId (autoincrement, primary index)
title
and the ingredients:-
id (...
0
votes
0
answers
100
views
Why does my message not appear on the page even though the server log shows it was sent successfully in CivetWeb + SQLite?
I’m building a local web chat feature using CivetWeb (C++), SQLite, and a frontend in plain HTML/JS.
When a message is sent, the server log shows:
Attempting to send message: product_id=3, sender=1, ...
2
votes
0
answers
63
views
Referencing a non-existing column in a CTE
Referencing a non-existing column in a CTE does not give an error in sqlite3, even if it looks like that the CTE is evaluated in answer calculation.
Take this example:
CREATE TABLE account (
...
-4
votes
1
answer
93
views
Calculate Duration in SQLite from M/D/YYYY H:MM:SS Text and Format as h:mm:ss
I have an SQLite table named trip where the started_at and ended_at times are stored as TEXT in a non-standard M/D/YYYY H:MM:SS (or HH:MM:SS) format. I need to write an SQLite query to calculate the ...
0
votes
0
answers
28
views
SQLite ALTER TABLE RENAME COLUMN not working on Android 10 device using SQLiteOpenHelper [duplicate]
I am trying to rename a column in an SQLite database (SQLiteOpenHelper) in my Android app. The code I am using is:
db.execSQL(
"ALTER TABLE $MY_TABLE_NAME RENAME COLUMN $OLD_COLUMN TO $...
0
votes
0
answers
415
views
Issue with StoreKit 2 In App Purchases: "unfinalized statements / unfinished backups" SQLite Crash
I’m running into a persistent error while implementing StoreKit 2 renewable subscriptions in my SwiftUI app.
Context
I have a two-screen flow:
Screen 1: user selects a subscription plan (monthly / ...
0
votes
0
answers
81
views
Error loading lsqlite3 module for love2D due to "symbol not being found"
Follow-up to this question
My current project folder includes the main.lua file, a .db file, , a sqlite.lua file from this somewhat old page, and a lsqlite3.so file copied from my homebrew folder. ...
0
votes
1
answer
44
views
Should I disallow backups of sqlite to the same physical media? [closed]
Looking at the Sqlite backup options
https://oldmoe.blog/2024/04/30/backup-strategies-for-sqlite-in-production/
I have a question that is orthogonal to the backup method used:
suppose on Windows I ...
1
vote
0
answers
94
views
how to avoid error loading lsqlite3 module for Love2D?
Important edit: it think that the issue might come from the fact that I'm using a Mac that uses an Arm64 processor. However, I'm not entirely sure since I don't know what that means.
I'm trying to use ...
0
votes
1
answer
66
views
Escaping weird path names with sqlite json_extract
I'm trying to figure out how to escape weird field values in a json_extract expression. Here's my table:
create table records (
record_pk text primary key,
config json not null default '{}',
...
0
votes
0
answers
34
views
How to retrieve data from a select HTML form to Flask [duplicate]
I'm trying to get a name and date from an HTML form (using Jinja syntax) and im not being able to retrieve any values from the "select" dropdown menus.
I don't know if the syntax for "...
0
votes
2
answers
144
views
With SQLite, where is the as keyword optional, and what difference does adding it make, if any?
Currently I am learning Python programming for manipulating SQLite database, and I am a bit confused with the following SQL statement which works.
SELECT *
FROM student s, result r
WHERE s.studentid =...
0
votes
1
answer
106
views
Why does Streamlit throw "ImportError: cannot import name 'get_all_transactions_by_user' from 'db'" even though the function exists?
I’m building a personal finance management app in Streamlit with multiple pages (dashboard.py, transactions.py, budget.py, export.py). I have a db.py file that contains all database functions, ...
0
votes
0
answers
102
views
Record Selection in Main Dataset from a Sub Dataset in Delphi
The application I'm writing has a main form where all the database fields and DBGrid that contains the entire SQLite dataset (ExpItemQuery) reside. I have designed a database search functionality into ...
1
vote
1
answer
63
views
Django migration successfully applied, but the database is not modified
I need to use a secondary SQLite database in a new Django project. This database is on the local filesystem but outside the Django folder. Its path is specified in a .env file at the root of the ...
0
votes
0
answers
69
views
SQLite3 Exec Failing with Assertion in checkWalModeFromQuery on Xcode 26
I'm encountering a runtime assertion failure when trying to execute a SQLite query using sqlite3_exec in Xcode 26. The error occurs specifically when attempting to set WAL (Write-Ahead Logging) mode ...
0
votes
0
answers
21
views
Problem using a TRESTResponseDataSetAdapter with Boolean fields and SQLite
I am writing a Firemonkey mobile app, and as the user could be without a signal at times, I need an SQLite local database to hold some data.
I am using Delphi's Rest components to call an endpoint and ...
0
votes
1
answer
58
views
Python is creating a connection for each execution in executemany [closed]
I have the following code
logger = get_console_logging_object()
def get_db_path() -> str:
""" get the path to the database file"""
script_path = Path(__file__)....
1
vote
2
answers
148
views
Room Database - Secondary ORDER BY not working Java
I have a RecyclerView list of CardViews for tasks, etc. Some of the CardViews have a due date attached to them, others have no due date. I want to show the CardViews with due dates on top of the ...
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 ...
2
votes
2
answers
130
views
Why does my `RoomDatabase` instance not have all the public methods?
I have a Kotlin project for desktop which uses Room DB.
The main function looks like this:
import androidx.room.Database
import androidx.room.Room
import androidx.room.RoomDatabase
import androidx....
2
votes
1
answer
103
views
Is sqlite upsert "insert or ignore ... on conflict do update..." a valid statement?
In Sqlite3...
I need to copy data from an unconstrained table to a more constrained table. I need to drop illegal entries (null), replace matching existing entries (unique x), and add new entries. ...
2
votes
2
answers
69
views
Correct way to handle attached SQLite databases with jOOQ
I'm trying to do a join on a table in an attached SQLite database (https://sqlite.org/lang_attach.html) and I'm having trouble getting jOOQ to format the field names correctly. The query that jOOQ is ...