Questions tagged [sqlite]
SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.
87,018
questions
0
votes
1answer
10 views
Good way to “wrap” the opening and closing of a database around functions in Python?
I've looked at a few related questions on StackOverflow and at some documentation/guides regarding wrappers, all of which tells me "no," but this doesn't seem right. That said, I'm very new ...
0
votes
0answers
14 views
Store list of tuples into SQLite database
I need to store a list of tuples [(2345,'MID'),(4543,'GKP')...] from my from_home_player_1_to_home_player_11 dataframe column into my database. I'm trying to insert the table as I create it:
c.execute(...
-1
votes
0answers
27 views
Why does typing db.create_all() in the command prompt not work?
Following a video on creating a login system with flask with sqlalchemy and keep on getting this error when trying to create the tables for my database after typing db.create_all() in the cmd
My code:
...
0
votes
2answers
17 views
How to write several item in table at the same time - ORMLite - Java
I use ORMLite on a solution made by server and clients.
On server side I use PostgreSql, on client side I use SQLite.
In code, I use the same ORMLite methods, without taking care of the DB that is ...
10
votes
2answers
5k views
In sqlite3, is there a foreign_key integrity check?
I'm just teaching myself sqlite and so I was surprised to see my foreign_key constraint not working when I was able to delete a parent entry. I then learned after reading more that the pragma for ...
0
votes
1answer
30 views
to_sql() alternative to fast_executemany for databases other than SQL Server
I'm trying to speed-up the way to write my DataFrame in a SQLite database.
To do so, I'm trying to use Method 4 on this website.
I also found a more elegant way to change the variable cursor....
0
votes
0answers
18 views
sequelize with custom id validation error
I am creating a custom id(primary key) and set a default value(random string using nanoid library) to it so I don't need to specify an id when I am creating and inserting data to DB(so works like a ...
0
votes
0answers
3 views
In sqlite-jdbc driver(3.23 or 3.30),fail update when string is too long, without any exception. But in command line and navicat, it's OK
SQL
replace into articles(id,grade,no,title,content,newchars,update_time)
values(1394823098212,'1','8','title','**LongUtf8String**',1614001996557)
If the length of LongUtf8String exceeds 2689 bytes, ...
0
votes
0answers
26 views
+50
How to use sqlite acorss multiple (spawned) python processes via sqlalchemy
I have a file called db.py with the following code:
from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
engine = create_engine('sqlite:///my_db.sqlite')
...
1
vote
2answers
21 views
Normalizing an adjacency list
I have data represented in this fashion (not sure I properly call it an adjacency list, but that's the best description I can think of):
+--------+-------+
| Level | ID |
+========+=======+
| ...
0
votes
0answers
14 views
Sqlite disk I/O error (python - databricks)
So, I'm running a cluster on Databricks. when I try to query an sqlite file on it like this:
import sqlite3
conn = sqlite3.connect("/dbfs/FileStore/testing.sqlite")
cur = conn.cursor()
cur....
0
votes
3answers
47 views
SQL query many-to-many: find all items with all tags included in a given set
I'm working with SQLite. Basically, I have a many-to-many relationship between items and tags. I want to find every item such that all its tags are included in a given set (found by another query). So ...
1
vote
3answers
2k views
How do I add a new key value pair to an object in PHP?
I guess my question is two-fold
In Python if I do this
x = {key: value}
I've created a dictionary
In javaScript if I do the same thing I've created an object
What is that in PHP? It could just be ...
1
vote
0answers
14 views
Android - Room Migration didn't properly handle CREATE table
I recently updated the Room library to 2.3.0-beta01 from 2.2.5.
Here is the migration that I added.
"CREATE TABLE 'bookmark' ('id' TEXT, 'content_id' TEXT NOT NULL, 'bookmark_position' INTEGER ...
3
votes
3answers
3k views
Can I export my sqlite database from Flutter?
There are various articles on how to import data on the internal database from a csv, from another database etc .. but I haven't found anyone explaining how to export the flutter database.
The goal ...
0
votes
0answers
25 views
SwiftUI FileDocument using Sqlite and GRDB
In a document-based SwiftUI application, Iād like to persist each document to a separate Sqlite file using GRDB as a Sqlite wrapper. Itās straightforward to load Sqlite files in a document that ...
0
votes
0answers
10 views
How To Save Unsigned Long Variable To Android Room Database?
I've got a MariaDB database running on my server and for the application side, i'm going to use a local database.
On my server database i'm holding ID as unsigned bigint which must be equal to ...
0
votes
0answers
19 views
There is no data source for Sqlite in VS2019 C# with EF6
A WinForms application at VS 2019 (version 16.5.3) (C# ) with .NET V4.7.2 is created and all steps done same as the below link:
https://github.com/ErikEJ/SqlCeToolbox/wiki/EF6-workflow-with-SQLite-...
1
vote
1answer
4k views
Can't get SQLite to work in VS2019 with EF6
I'm trying all day to get this working, but so far no luck.
I'm building a WinForm application for .NETv4.7.2
I will distribute this application to a client and might need to update it later. For ...
0
votes
0answers
24 views
displaying total count of records on a screen with js
i am building an application for a school where the users can insert records into a database, and on the home screen, each subject record count should be displayed, however i cant seem to get this ...
10
votes
10answers
15k views
Database file is inexplicably locked during SQLite commit
I'm performing a large number of INSERTS to a SQLite database. I'm using just one thread. I batch the writes to improve performance and have a bit of security in case of a crash. Basically I cache ...
0
votes
0answers
12 views
sqlite3 returns a syntax error on a user function
In a C program using sqlite3 I created a user function:
rc= sqlite3_create_function
(db, /*database*/ ...
0
votes
2answers
52 views
smart way to structure my SQLite Database
I am new to database things and only have a very basic understanding of them.
I need to save historic data of a leaderboard and I am not sure how to do that in a good way.
I will get a list of ...
-2
votes
1answer
19 views
How to join 2 Table python sqlite3?
i would ask How can you join 2 tables using sqlite3 on python pycharm ,i tried diffrent things , but this one seems to be correct but idk why it's not working (Knowing that i already inserted those ...
0
votes
0answers
11 views
How to store parsed JSON data into SQLite3 with swift5 iOS app
I want to store parse JSON string into my local database SQLite3. I easily parsed data from URL and also created database I only want to store the JSON data into SQLite3
0
votes
2answers
1k views
SQLite Exception: No Such Column
I'm making a timetable app, and i'm looking to get a string of room details (eg. H21) from a database, searching for an entry where it matches Day, Week, Lesson & Subject.
I keep getting an error ...
0
votes
0answers
11 views
How to declare the table name as an argument with GRDB
The function below works fine if I replace the ? with the name of one of the tables and remove the argument. However, I need the table name to be declared with the variable (theTable). I did't find a ...
-1
votes
1answer
18 views
My Code doesnt work (Sqlite3, Python, Delete)
I have the problem that when I want to delete a row from the database I get an error:
Traceback (most recent call last):
File "C:\Users\maxpr\Desktop\DevHub\Discord Bots\Privat\FAQ-Bot\venv\lib\...
0
votes
4answers
182 views
What is best way to store large data in local for iOS/Android
I'm working on an app and I have tried to use local storage but I'm not sure if it will be OK for my project.
I need to store really large data every second in my local database, and at the end of the ...
1
vote
1answer
26 views
translating pandas group to sql(ite): limit in group
The Problem
I'm trying to translate a pandas query into a SQL(ite) query. The main issue in my translation to SQL is trying to place a limit in a group.
Here is a setup (in python) of an example ...
0
votes
0answers
13 views
Seek advise on creating sqlite query to process buy sell transactions according to FIFO method and produce a combine summary
I am attempting to create a sqlite query to process stocks buy sell transaction based on FIFO method to track summary of counters performance.
There are 2 queries written so far:
Matching 1 buy and 1 ...
-1
votes
1answer
60 views
SQL query returns result multiple times [Solved]
I'm pretty new to SQL and am trying to join some tables in SQL.
I'm using SQLite3 and Pandas and have the following table structure:
User
|
Measurement - Environment - meas_device - Device
...
3
votes
2answers
3k views
SQLite EF Core - 'FOREIGN KEY constraint failed'
In my ASP.Net Core project I am getting this exception by starting, becuase I am initializing the database in runtime:
fail: Microsoft.EntityFrameworkCore.Update[10000]
An exception occurred in the ...
0
votes
0answers
6 views
Query regarding sqlite3 2009 pro
I have installed sqlite 2009 pro and I am trying to load a .db file in sqlite3 management studio. But i am unable to load as there is an error " file is not encrypted or its not a db file" ...
0
votes
0answers
6 views
How to get current logged in user id in adapter?
I'm trying to work on a project using SQLite database.
In this project, I'm displaying all users in RecyclerView using an adapter class.
what I want to do is that, if a logged-in user clicks on any ...
56
votes
9answers
117k views
Attempt to write a readonly database - Django w/ SELinux error
I have a CentOS server on which I have Apache, Django, Django CMS and mod_wsgi. My Django project files are stored in the /srv directory and I have SELinux turned on for security reasons.
I've ...
0
votes
0answers
10 views
Timeoff Management - creating api calls for creating/approving/rejecting/cancelling leave requests
I am very much a beginner of node js and express and I am trying to use the timeoff management app https://github.com/timeoff-management/timeoff-management-application and be able to make api calls ...
0
votes
1answer
23 views
Strange symbols in SQLite text field
I have a simple SQLite database where data (names) is added with a C# application. The names usually get copied and pasted from .pdf files. I found out that sometimes copying a name from .pdf ...
65
votes
20answers
51k views
getLoaderManager().initLoader() doesn't accept 'this' as argument though the class (ListFragment) implements LoaderManager.LoaderCallbacks<Cursor>
I'm having trouble following a guide on using SQLite in Android. I'm using a ListFragment instead of a ListActivity(as in the example), so I have the ListFragment implement LoaderManager....
0
votes
1answer
11 views
SQL Query, two tables with a certain condition
I have two tables, Workers and Checkin.
Workers have an ID, name, role.
Check_in, has checkin_date (ddmmyyyy), checkin_id, and worker_id.
I want to find all workers that didn't check since Jan 2020.
...
0
votes
0answers
21 views
Xamarin SQLite db connections issue
I am trying to connect my xamarin app with SQLite, everything seems fine but in App.xaml.cs i get the following error: System.NullReferenceException: 'Object reference not set to an instance of an ...
3
votes
0answers
154 views
(Simple Crud SQLite ) React Native Example using react-native-sqlite-storage [closed]
I Create this mini tutorial to help.
Hope it helps someone.
Step 0:
Create a DB with the name user
create a table named Users
move this DB to android/app/src/main/assets
Step 1: After setting up your ...
-1
votes
0answers
43 views
SqlDapper issue with Guid
My SQL query is returning some records which contains GUID. Now when i use SQL Dapper to map it with my class, i am getting an error. Looks like there is a limitation for GUID here. But i tried using ...
278
votes
5answers
100k views
Version of SQLite used in Android?
What is the version of SQLite used in Android?
Reason: I'm wondering how to handle schema migrations. The newer SQLite versions support an "ALTER TABLE" SQL command which would save me having to copy ...
0
votes
1answer
22 views
createFromAsset() is not recognized in Android Studio
i was trying to prepopulate my Room Database but Android Studio says that it "cannot resolve method 'createFromAsset()' in 'Builder'. I am using room version 2.2.6 and the function was ...
0
votes
0answers
24 views
Sqllite as graph database
I want to use graph database with multithreading program so i was thinking about sqlite, i need to know if it can support graph database and if there is any graph database that support multithreading.
-3
votes
0answers
17 views
Selecting top 10 per week [closed]
I have a table that records clients and purchases by week. The column names are as follows:
week | id_client | total_purchases
I want to run a query in SQLite that provides a list of the top 3 clients ...
-1
votes
0answers
31 views
Why I cant delete the first input record in the label using sqlite database? but the rest can
def query():
global record
conn = sqlite3.connect('billing.db')
c = conn.cursor()
c.execute("SELECT *, receipt_no FROM billing")
records = c.fetchall()
print_records ...
0
votes
0answers
5 views
Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option [closed]
Meu vscode da esse erro An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your --lib ...
-1
votes
1answer
16 views
Can I force SQLite to reserve a set amount of hard disk space instead of growing dynamically? [closed]
I'm creating an application that will use SQLite for storing application data. Once the database reaches a certain size on disk, I will delete some older data as I don't want my application using ...