Questions tagged [sqlite3]

1

votes
0

answer
82

Views

Error when tring to run discord bot “node_sqlite3.node is not a valid Win32 application.”

What happened? After reinstalling all of my packages, I tried running my discord bot but it gave me this error instead: $ node Mei.js module.js:681 return process.dlopen(module, path._makeLong(filename)); ^ Error: \\?\C:\Users\RAP\Desktop\bots\mei-discord\node_modules\sqlite3\lib\binding\node-v57-wi...
itsYuuki
1

votes
1

answer
499

Views

ValueError: parameters are of unsupported type

This is my code: import sqlite3 connector = sqlite3.connect('Database_tester.db') cursor = connector.cursor() def Table_making(): cursor.execute('CREATE TABLE IF NOT EXISTS Tester(Roll_numbers TEXT, Names TEXT)') def data_entry(): data = ((i,) for i in range(1, 11)) inputy = ((input(x),) for x in ra...
mahir
1

votes
0

answer
347

Views

No package sqlite3 available

New to Python, sorry if my Question found stupid but need help. I Need to install sqlite devel on my server. but when i am trying to run sudo yum install sqlite3 libsqlite3-dev its giving the following error [[email protected] python3.6]$ sudo yum install sqlite3 libsqlite3-dev Loaded plugins: fastes...
Akhil Karkera
1

votes
0

answer
88

Views

sqlite3 limit with offset is not working in android

select * from limit 100 offset 200; Expected result is it should return rows from 201 to 300. But in android it is returning rows from 2 to 101. sqlite> create table test (id integer primary key autoincrement, name text); sqlite> insert into test (name) values('a'); sqlite> insert into test (name...
Sathish Kumar
1

votes
0

answer
125

Views

Node.js Express SQLite3: Can't Send HTML input data to SQLite3

Basically, I'm trying to add an ArtistId and Name using an HTML input into my SQLite3 database. Every time I press the submit button, I receive a '404 - Not Found' page instead of the '/success' page that I set up in my view folder, and my database is not being updated. I have run a simple test to m...
NoobJsDev
1

votes
0

answer
40

Views

i dont' know why my for loop isn't returning anything

i dont' know why my for loop isn't returning anything#table tame is the table from sql, it should return each item from the sql table in the format below. def count_columns(table_name): cur.execute('SELECT * FROM ' + table_name) for row in cur.fetchall(): if len(row) == '2': print('ID: ', row,[0], '...
H kan
1

votes
0

answer
100

Views

Inserting binary data with sqlite3

I would like to insert binary data in a database with sqlite3. compressed = zlib.compress(pickle.dumps(foo)) database.insert(cursor, 'bar', config=compressed) Here, database is from another module from another class, that performs execute. In that class, the command looks like this: cursor.execute('...
Brynhildr Xie
1

votes
0

answer
201

Views

Electron sqlite3 package app module not found

When I run the packaged electron app for windows(which includes sqlite3), I get the following error: Knex: run $ npm install sqlite3 --save Error: Cannot find module 'C:\Users\User\Desktop\Shoppinglist2-win32-ia32\resour ces\app.asar\node_modules\sqlite3\lib\binding\electron-v2.0-win32-ia32\node_sql...
1

votes
1

answer
171

Views

SQL use wildcard <% and placeholders <?> in a SELECT statement. (In python with sqlite3)

I am trying to go through a list of gene names and query them in my SQL database like this: list_of_genes = ['IFNL', 'TMPT', 'G6PD', 'UGT1A1', ...] for gene in list_of_genes: sql.execute('''SELECT DISTINCT gene_symbol, haplo_function FROM Haplotypes WHERE gene_symbol LIKE '%' + ? + '%' ''', (gene,)...
Nulnulzeven
1

votes
0

answer
18

Views

Create a Clickable Link from a Table made from Database Results

I'm making a class web-page that allow you to view class details by clicking a link associated with the class. I have a database loaded with classes,enrolled students as well as the assigned professor. Below I have the query in a for each loop creating a table from the results however I want to make...
Robert Farmer
1

votes
2

answer
89

Views

username and password validation through node.js and sqlite3

I have a table with usernames and passwords that I want to be authenticated when someone enters them on the webpage. If the username and password match, it redirects to a certain page and if they don't then it redirects to a different one. What I am doing is using the Select statement to only select...
Jess_Rose88
1

votes
1

answer
57

Views

Constrain python function arguments [duplicate]

This question already has an answer here: Best way to check function arguments in Python [closed] 14 answers Is there a way in python to constrain an argument of a function to be only a set of values, the user should type the name of the column to change: import sqlite3 def update_table(self, id: i...
Kostynha
1

votes
1

answer
171

Views

SQlite bitwise operation and updation

I've an sqlite3 db file in which the tables are as follows sqlite> .table main_db test sqlite> .schema test CREATE TABLE test (ID INTEGER PRIMARY KEY AUTOINCREMENT, NUM INTEGER); sqlite> .headers on sqlite> .mode column sqlite> select * from test; ID NUM ---------- ---------- 1...
1

votes
2

answer
153

Views

How to List the tables names in the Sqlite3 database in Java

I am using sqlite3 database in a java application. How to programmatically get names of all tables in the database? I have tried google and stackoverflow as well, and could NOT find a simple solution as yet. Here is the MySqli code I use with PHP, I am trying a similar approach in Java-Sqlite3 mysql...
Padmanabhan
1

votes
0

answer
74

Views

Problems when trying to install SQLite3

I installed SQLite3 successfully (I think), however when I try to node index.js I get the following: sudo npm install sqlite 3 --unsafe-perm ... + [email protected] + [email protected] added 4 packages and updated 1 package in 320.95s node index.js module.js:549 throw err; ^ Error: Cannot find module '/home/pi/Doc...
Angel
1

votes
1

answer
55

Views

How to fix error in bash script on sqlite

There is a list of list.txt for example 111 222 333 and sqlite of the database on /folder/$list/sqlite db On this script, everything works until the command is redirected to sqlite #!/bin/bash IFS=$'\n\r' for line in $(cat list.txt) do cd /folder/$list/ sqlite3 basename.sqlite
3ra
1

votes
0

answer
53

Views

sqlite3.InterfaceError: Error binding parameter 0 - probably unsupported type only on some systems

I have a SQLite table in Python: conn.execute('create table if not exists users (id integer primary key, username text, fullname text, points integer)') Then I'm querying this table: pk = int(like['pk']) #just some integer users = conn.execute('select * from users where id = ?', (pk,)) I'm getting t...
Can Poyrazoğlu
1

votes
1

answer
38

Views

Select data based on datestamp with sqlite3 query

I'm trying to use sqlite3 to access data in a database based on a value for the datestamp. Please consider the following code: live_db_conn = sqlite3.connect('/Users/user/Documents/database.db') time_period = (dt.now() - timedelta(seconds=time)).strftime('%H:%M:%S') time_period_data = pd.read_sql_qu...
Mr. President
1

votes
0

answer
58

Views

Android Room with multiple db

I am using room currently (migrate from ormlite). I use one db file at the beginning. But then we need to implement IM base on the database. Shall I use room with multiple db(one db per user), Or any other good way to Implement IM? It puzzles me very much -- One db file but complex table structure o...
Thomas Liao
1

votes
1

answer
27

Views

Can I use a recursive query to query a tree where the leaves reference another table?

I have table A of rows with column 'object_id', and 2 NULL columns A_id and B_id, each row of A (among rows with the same object_id) either references table A self or table B, ie columns A_id and B_id are mutually exclusive. e.g. Table A object_id A_id B_id ... 1 NULL 5 1...
MMM
1

votes
1

answer
47

Views

Python3 SQLite row won't be removed on Ubuntu, but will be removed on Windows

I'm trying to remove a row in SQLite3, on windows it removes the row, but on Ubuntu it won't. I'm not sure what's causing it/how to fix it. Both systems are running Python 3.6.5, and I did not install SQLite3 with pip. I'm running the following script, which creates a db.sqlite, creates a user table...
reinierkors
1

votes
1

answer
206

Views

Can I export cookies from python to Chrome?

Here's what I'm trying to do. I want to read the cookies from Chrome's sqlite file, use them on python and then save them again to Chrome's sqlite file since they could have been updated while using them with python. This is more or less the code I have to test this, I can extract them and use them...
Daviid
1

votes
0

answer
23

Views

C# - How do you join SQLite databases from different location?

I've tried to join SQLite databases from different locations; folder1 = which my main database located. folder2 = somewhere in my local C. Here's what I did so far but i have have no luck. I think missed something? internal void Fill_DataCollection(string folder2) { string SQL = 'ATTACH '' + folder2...
Jesson
1

votes
1

answer
313

Views

How to export SQLite database the right way

So I was reading quite a lot, but still don't understand how to do it. In the location where app database suppose to be located there is three files instead of one .db it has now .db .db-shm and .db-wal so how do I export this database as one file with all its data? Because as far as I understand no...
kosas
1

votes
1

answer
183

Views

How do I use contentvalue for inserting (Custom)ARRAY list in SQlite?

ERROR- am getting as type mistmatch. Here is my code-Please help public void addDetailDescription(List detailList) { SQLiteDatabase db = this.getWritableDatabase(); ContentValues values = new ContentValues(); for (int i = 0; i < detailList.size(); i++) { Log.e('vlaue inserting==', '' + detailList.ge...
Saranya
1

votes
0

answer
356

Views

How to backup/restore SQLite database in React native

I am using andpor/react-native-sqlite-storage for managing SQLite database in React native. Now I want to backup all my database into a encrypted file then restore this at later time. I know how to do this in android but don't know how to implement this in react native. if it is in android below co...
Vinayak B
1

votes
0

answer
70

Views

Which temp directory is used by SQLite VACUUM

When the SQLite VACUUM command is run pro grammatically, how to find which temporary directory is used while executing the command. I am using sqlite version 3.6.7 I have this question because I get the following exception. So I want to check and if possible change the temporary directory that is us...
Srinivasan
1

votes
0

answer
158

Views

How Offline Data persistance for Desktop app with electron Framework can be done?

I am using Angular 5 application and using electron FrameWork to convert it to desktop application and its working fine. How to persist about 10000 records of datasets in JSON form in desktop client side. So that whenever a user is in the offline mode he/she will be still able to use our application...
Karthik GB
1

votes
1

answer
343

Views

How to store data from python/kivy app

I'd like to know how to store data from my app so I can review the data when I re-run the app. e.g. I type some info in a TextInput and then when I click the submit button, the info is pasted in a label, so I close the app and when I reopen it the info should be appearing in the label. I know that t...
Gustavo Menezes
1

votes
0

answer
30

Views

Add SQLite function with Android architecture components

I've implemented various distance and bearing functionality between GPS coordinates in iOS using sqlite3_create_function. Porting it to Android I've started to look at the Android architecture components such as Room and was wondering if there was a way to use sqlite functions in this? I've seen ref...
codebrane
1

votes
0

answer
143

Views

Whatsapp ChatStorage.sqlite file corrupted

I have figured that some parts of my sqlite file are corrupted. I don't have any other backup than this with error. Please help as I have almost my lifetime chats included in this file. Below is the result from the pragma integrity check: sqlite> .open ChatStorage.sqlite sqlite> analyze; Error: data...
Sagar Radia
1

votes
0

answer
116

Views

Run django test parallel with in memory sqlite3

Is it possible to run django test cases in parallel with in memory sqlite3 with new database for each test case? Docs says: '--parallel' Runs tests in separate parallel processes. Each process gets its own database. # *settings_test.py DATABASES['default'] = {'ENGINE': 'django.db.backends.sqlite3'}...
Vladimir
1

votes
1

answer
50

Views

Collect() from table in SQLite in R

I am trying to use the collect() function from dplyr to query a table (comp_fleet) in SQLite. The following code works: Cposns % arrange(mmsi, desc(timestamp))%>% dplyr::filter(!is.na(lat)) %>% collect() However when I try top_n(), I get an error: Cposns % arrange(mmsi, desc(timestamp))%>% dplyr...
Dhiraj
1

votes
2

answer
14

Views

Getting an error inserting values into a table of SQLite3 DB using python3

Table has already been created. Problem arising while inserting values into it. Format method not working fine. classroom_data = [ {1,'Raj','M',70,84,92}, {2,'Ajay','M',75,92,42}, {3,'Alex','M',62,42,61}, {4,'Smita','F',49,50,46}, {5,'Palak','F',84,62,44}] connection = sql.connect('classroom.db')...
1

votes
1

answer
28

Views

Asynchronous programming sequencing problems in node.js

I have picked up a project where when a node.js program starts for the first time, no database will exist. The program should create the database tables if they don't already exist. However, in the sample program below, the data is not inserted if the database did not exist on first run because the...
Angus Comber
1

votes
0

answer
165

Views

Packaging Python Flask-electron Application

I just created an electron app which is powered by Flask and sqlite3. It works nice when I run the app in terminal but when I build this app with electron-packager, It succeed but the app does not work. Getting Sql Database error, sqlite3.OperationalError: no such table: licenseCheck How do I packag...
Jis
1

votes
1

answer
571

Views

react native react-native-sqlite-storage not return result

I'm use SQLite database from react-native-sqlite-storage I'm not getting result for display in alert it display undefined I'm also try without await and async MainFile import DBHelper from './DBHelper.js'; export default class MainFile extends Component { componentDidMount() { this.dbTransaction();...
Bhaumik Surani
1

votes
1

answer
54

Views

EF Core SQLite TPH interitance combined key -> duplicate key?

I'm trying to setup a simple SQLite database using a one-to-many relationship and TPH-mapping. Table creation has been applied using the following commands: CREATE TABLE Masters (Id VARCHAR2 PRIMARY KEY); CREATE TABLE Slaves ( MasterId VARCHAR2 NOT NULL, Discriminator VARCHAR2 NOT NULL, SlaveAValue...
1

votes
1

answer
81

Views

SQLite and Python, getting just text value from table

I´m trying to get a clean output value from a sqlite table but not luck so far. The output value has , ' and () on it. >>> import sqlite3 >>> db = sqlite3.connect('C:\\Users\\userRock\\Desktop\\gen_profile.sqlite') >>> cur = db.cursor() >>> cur.execute (''' CREATE TABLE user (id INTEGER PRIMARY KEY...
Claytor
1

votes
0

answer
38

Views

Does MySQL 5.6 support 3D Points?

Recently I've been trying to migrate from sqlite to MySQL 5.6 (5.7 had problems with GIS fields). I realized that none of my 3D Points have been imported into the MySQL database so I went in and manually tried to update rows with Django dumpdata output but apparently it doesn't accept 3d points and...
yam

View additional questions