Questions tagged [sqlite]

SQLite is an exceptional software library known for embodying its own distinctive qualities. It's an open-source gem that boasts a serverless, zero-configuration attribute while being equipped with the prowess of a transactional SQL database engine. With SQLite leading the pack, it has proven to be the dominant force in terms of deploying SQL database engines across the globe.

The SQLite database accessed through Flask exclusively returns variables, rather than actual data

I have a custom flask application that interacts with a sqlite database: @app.route('/<subject_id>') def subject_id_lookup(subject_id): entries = query_db('select visitdt, cvnotes from exam where id = ?', ...

The SQL statement encountered a syntax error near the character "%" in the SQLite database

I consistently encounter the syntax error: cur.execute('SELECT * FROM ' + table + ' WHERE Name = "%s";' %(name)) sqlite3.OperationalError: near "%": syntax error ...

Exploring the Efficiency of MongoDB through Advanced Queries

The Tale Behind the Scene In my current project, I have combined MySQL and SQLite to overcome the limitation set by my provider's 1GB MySQL DB restriction. Each user now has their own SQLite database, which has enhanced performance but poses a challe ...

I am attempting to generate an SQLite table using Python 3, however, I am encountering an issue where it is indicating that I am providing an excessive amount

I am working on a project to develop a basic database that contains a list of names and ID numbers. My goal is to have 2 columns and a total of 4 rows, each representing a different person. However, I keep encountering the following error: OperationalEr ...

Tips on effectively extracting data from a SQLite JSON field that contains an array value

Within my sqlite database, there is a field that contains a complete JSON object. I need to perform some select queries on this JSON data. Specifically, I am looking to extract comments where the "pod" field is 'fb'. How can I properly extract th ...

Is there a way to change the format of a date stored in SQLite from MM/dd/yyyy to dd/MM/yyyy using JQuery or JavaScript?

Is there a way to convert a date from mm/dd/yyyy format stored in sqlite to dd/MM/yyyy using jquery or javascript? For example, converting 12/13/2013 to 13/12/2013. I attempted to use $.format.date(vardate, "dd/MM/yyyy") but it was unsuccessful. ...

Retrieving all users in Sqlite database with a specific value

I am looking to identify and access each user who has a specific value in their row. Here is an example code snippet of what I want: sql.prepare("SELECT * FROM raid WHERE raid1 > 0 AND NOT id='685337576810610734'").get().forEach(async (user) ...

I am exploring how to utilize sqlite with Python and aiming to retrieve the count of rows that satisfy specific conditions

After successfully loading an excel spreadsheet into an sql table and being able to view it, I am now looking to determine the number of records that meet a specific criteria. In my case, columns 1 and 2 contain names and I want to find out the occurrences ...

Generating a NumPy array from a list using operations

I retrieved data from an SQLite database stored in a Python list with the following structure: # Here is an example data = [(1, '12345', 1, 0, None), (1, '34567', 1, 1, None)] My goal is to convert this list of tuples into a 2D NumPy a ...

Unable to access an SQLite database using a relative path within the ENV file of a Laravel project

I have recently completed a vanilla Laravel-React project. You can find the project reference in the following hyperlink: https://github.com/napolev/laravel-react-vanilla In this particular project, I decided to use SQLite instead of MySQL. However, I a ...

Is there a PHP version that is solely dedicated to SQLite implementation?

Is there a way to implement SQLite in PHP 5.1.6 without the SQLite extension installed? I'm working on an application that would benefit from using a relational database, but the server it needs to run on has been configured with '--without-sqlit ...

Having trouble installing sqlite3 dependency using npm

Running Pop!_OS (Ubuntu) 20.04 poses a challenge when attempting to add sqlite3 as a dependency in a nodejs project, resulting in an onslaught of warnings: npm WARN deprecated <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="cbb9 ...

Fixing the error message stating 'Argument of type '{}' is not assignable to parameter of type 'any[]'. [ng] Property 'length' is missing in type '{}'. Here are steps to resolve this issue:

Currently, I am in the process of developing an Ionic Inventory Management application that incorporates a Barcode Scanner and SQLite database by following this tutorial: Upon adding the following code snippet: async createTables(){ try { awa ...

Convert the nodejs undefined into bindings.js within an Electron project (and utilize better-sqlite3)

My Electron.js project setup includes the following steps: Installing node 14 Installing vue-cli Creating a template project in Vue with: vue create myproject Adding an Electron wrapper like this: vue add electron builder Installing the better-sqlite3 lib ...

Attempting to populate the database with information from a JSON array

My code is designed to work in the following way: An HTTP post request (in an AsyncTask class) is sent to a MySQL database using PHP to retrieve JSON encoded data. The JSON encoded data from each row is fetched one by one in the dbCodeHelper class, which ...

PHP not properly displaying Sqlite rows

Hello, I am attempting to display all proxies from my SQLite database. Here is a screenshot for reference: https://i.stack.imgur.com/6x603.png Strangely, the proxies are not being displayed in the browser and there are no visible errors. When I execute ...

The SQLite query is producing duplicate values

The database schema includes the following tables: names: id | firstName | lastName phones: id | phone1 | phone2 | phone3 The objective is to display the first and last names of registered users. Subsequently, based on the user's ID, show thei ...

What is the proper way to form a SELECT query using a list as a parameter input?

Code This particular code snippet is optimized for situations where the list targets_in_sw contains only a single value: sw_current = cursor.execute("SELECT * from SOFTWARE_") sw_current = sw_current.fetchall() for sw_item in sw_current: current_soft ...

"Encountered an OperationalError while trying to insert JSON data into sqlite database: Error message stating that the token "{"" is

In my code, I have implemented something similar to this: import sqlite3 ... sqlString=company['name']+","+simplejson.dumps(info) cur.execute("INSERT INTO companyInfo VALUES("+sqlString+")") However, when running it, I encountered the following ...

Is there a way to combine tables, perform aggregation, and then convert the results into JSON format using SQLite and PDO?

I'm facing a challenge with outsourcing result-aggregation from Android to PHP. I am having difficulty constructing a query that involves joining tables and encoding the results into JSON format. Specifically, I am trying to determine the coolest hero ...

Error: Attempting to convert circular structure to JSON using a GET request

When attempting a GET request on "/strutture" using Insomnia, I encounter the following error: TypeError: Converting circular structure to JSON You can find the repository here. The error is occurring in the server folder, as I am still in the process o ...

Set up SQLAlchemy to purge all records from a specific table at regular intervals

I'm currently working on a function that has the capability to schedule deletion of all rows within an SQLAlchemy model. To achieve this, I have opted to use apscheduler. But each time I attempt to execute the task, I encounter the following error me ...

An error occurred when attempting to remove the database file due to it being currently in

I am currently facing an issue with creating and then deleting an SQLite database using the before and after Mocha hooks. When utilizing the Node.js SQLite library, I encounter an 'Error: EBUSY: resource busy or locked...' message upon calling fs ...

I am encountering the issue where Prisma client python consistently notifies me that my client has not been generated, despite the fact that I have already executed the necessary

After setting up Prisma Client Python and SQLite to create a database for my program successfully, I encountered an issue when trying to run my program. Despite ensuring that everything was installed correctly and running commands like "prisma generate" an ...

Guide to conducting Drizzle Migrations in SQLite with Docker for a live database on a Virtual Private Server with Next.js

Planning to conduct a Drizzle Migration on Production through a VPS. Facing limitations with executing two commands pnpm db:migrate:prod and pnpm start simultaneously in a Dockerfile. Dockerfile # Seeking guidance on running `db:migrate:prod`. CMD [" ...

Retrieve the ID of the row affected by a trigger when using INSTEAD OF INSERT

Recently, views have caught my attention and I find them to be a fascinating concept. However, I've encountered a problem where I am unable to retrieve the ID of the newly inserted row in an intercept trigger. I've searched extensively online bu ...

Converting a SQLite database to JSON using Haskell

How can I export a SQLite database to a JSON file in Haskell? Most other questions involve parsing JSON and saving it to SQLite, but I am looking to do the opposite. Any suggestions or references would be greatly appreciated. I have developed a Haskell ap ...

Generate a user with unique UUID identifier and an array of nested objects

When using GraphQL, React, and Prisma, I encountered a challenge in creating a user with a UUID as the ID and a nested object array containing all input data related to that user. My objective is to display all input data associated with a user in React. H ...

An issue has occurred on the Windows Azure App Service: It is recommended to manually install the sqlite3

I'm facing a challenge while attempting to run my web app on a Windows Azure App Service. The back-end of my app is developed in Node.js/Express using TypeScript (compiled with tsc, not Webpack) and integrates Sequelize to connect to a SQLite 3 datab ...

Is there a method in Flask to conceal a specific @app.route so that only the application itself can access it? I am concerned about the visibility of my database through a URL in JSON format

Currently, I am working on a FLASK server that utilizes sqlite3, json, axios, and VUEJS. My VueJS frontend communicates with the sqlite3 database through axios. The database is sent using jsonify over @app.route('/api/getdatabase', methods=[&apos ...

Is there a way to retrieve only the latest information from the database without fetching all the data?

Currently, I am working with sqlite3 in Python 3 and I have a scenario where I only want to retrieve the updated data from the database. To clarify further, let's say the database already contains 2 rows of data and then I add 2 more rows. How can I e ...

Transforming Child JSON Objects into Tables Using Xamarin Forms

I have a question that seems simple. Despite searching online, I couldn't find a solution. Here is the JSON data I received from an API: [ { "userId": "6ba8da0c-b307-40b6-b858-5fb1b880d473", "nomeCompleto& ...

Enforce a restriction on integers depending on a specific field from a different model in peewee

Currently, I am tackling a project that involves creating a mock webshop. This assignment requires me to work with models for users, products, tags, and transactions. class Product(peewee.Model): description = peewee.CharField() price_in_cents = pe ...

Inquiries regarding how to create a table in SQLite3 using Python

I've been exploring sqlite3 in Python 2.7 and trying to master the art of creating tables in a database. However, when I attempt to check if the table has been successfully created using the command .tables, I encounter an error: invalid syntax Be ...

Troubleshooting problems with ORDER BY in Sqlite3 and PDO

When attempting to execute the following SQL statement: SELECT * FROM table ORDER BY column using a PDO-Object in PHP, I keep encountering an issue. Specifically, I am getting an error message indicating that there is a problem with calling the fetchall( ...

Leveraging sqlite memory database for selenium testing in Rails 4

Currently, my rspec tests are running smoothly using a memory sqlite database. However, when I run selenium driven tests (describe "does something", :js => true do), the web browser encounters an error stating SQLite3::SQLException: no such table: users ...

Error encountered while attempting to call `prisma.job.findMany()`: Database path issue occurred when trying to connect to my SQL Lite database on Vercel

Whenever I attempt to access a page that loads data on my next.js application, I encounter a 504 internal server error. The error message reads: Error retrieving users: PrismaClientInitializationError: Invalid `prisma.job.findMany()` invocation: Error qu ...

Converting a cursor object to XML or JSON on an Android platform: Step by step guide

Are there any libraries available to directly convert a Cursor object to XML or JSON? For instance, if we have a table with two columns: id and name. When I retrieve a cursor object from the database, is it possible to convert it into <XML> <id& ...

SQLite in Python: TypeError in Update Statement - Function requires 2 arguments but only 1 given

There seems to be an issue that keeps popping up findSenGroup = cur.executemany("UPDATE SEN_Table SET SenNumber = " + senNumStr + " WHERE FormName='" + nameGroup + "'") TypeError: function takes exactly 2 arguments (1 given) error when using t ...

cryptic SQLite3 error

I have created a Python database using SQLite3 and I am encountering an error when trying to add data. The error message states, You did not supply a value for binding 1. I have previously made the same type of database with different values and did not fa ...

Issue occurs during the build process of Node-gyp where the error "no member named 'ForceSet' in 'v8::Object'" is encountered while using Node sqlite

Encountering a build error while attempting to install global packages with sqlite3 dependencies. Uncertain about debugging node build errors like this, any assistance is welcomed. It seems that the xcode error is not the source of the problem. Recently u ...

Is it possible to create a table using a loop in an SQLite query?

Welcome In the company where I work, Excel is currently being used to manage a large database of items for cost estimation purposes. To simplify this process, I am developing an Electron App that will replace Excel with a more user-friendly interface and ...

Challenges arise when utilizing SQL and Python for extracting data

I'm facing an issue while retrieving values from a database using sqlite3. Every time I extract values, one number is in this format: [(6,)] It appears to be a tuple. However, I only want the value 6 without the ,, (, and [. Any help would be great ...

How can you Use Django to Populate a Table Using Data Migration?

I need to populate a database table, and according to this source, the recommended method is to use a data migration process. There is an auxiliary function called get_my_values that returns a dictionary of dictionaries with a specific structure: { o ...

Unable to insert rows into an array using sqlite3 in Node.js

I have a snippet of Node.js code that queries a SQLite Database and prints each row individually. The original code is as follows: var sqlite3=require('sqlite3').verbose(); var db=new sqlite3.Database('./database.db',(err)=>{ i ...

Convert the rails database to a JSON file

Is there a way to export the information stored in a Rails sqlite3 database to a file? Currently, I am working with rails 4. My goal is to extract all of the data from my database for future use when resetting it or transitioning to a different database ...

Is it possible to transfer a sqlite3 database to tsv format using Python code?

Looking to extract tables from a sqlite3 database and export them into a tsv file. Is there a feature in pandas that can accomplish this? I am familiar with the sqlite commands: sqlite> .mode tabs sqlite> .output test1.tsv sqlite> Select * from ...

Having trouble installing sqlite3? Encounter an issue like this: "srcdatabase.cc(35): error C2248: 'Napi::Env::DefaultFini': cannot access private member declared in class 'Napi::Env'"?

Encountering issues while trying to install sqlite3 for a Strapi app I've attempted using yarn to install sqlite3 in various ways, but to no avail. Below is the error log: Error message: Issue with installing sqlite3 when creating a Strapi app (..& ...

Save the result of a terminal command into an sqlite database

When I run a particular shell command in node js, the output is displayed on the console. Is there a method to store this output in a variable so that it can be POSTed to an Sqlite database? const shell = require('shelljs'); shell.exec('a ...

Issues with Typescript and TypeORM

QueryFailedError: SQLITE_ERROR: near "Jan": syntax error. I am completely baffled by this error message. I have followed the same steps as before, but now it seems to be suggesting that things are moving too slowly or there is some other issue at play. ...

Creating a mobile application for iPhone 4 that utilizes a sqlite database

I have been working on an app that involves storing JSON data in a SQLite3 database by creating and inserting the data programmatically. Everything is functional, but I am looking to improve the user experience by accessing the data from the local databa ...

Tips for resolving SQLite cookie error code 1555 in Python when using Selenium

I have a piece of code that is designed to open a specific website, log in, and then go to a directed link. It was working perfectly when I tested it individually, but now I need to run multiple instances of it. To achieve this, I simply copy and paste the ...

Issue with SQLite: Foreign Key "ON DELETE SET NULL" action failing to trigger

What could be causing the failure of ON DELETE SET NULL when deleting a row via the application code, while working correctly when executing an SQL statement manually? I have two tables in my database, a todo table and a category table. The todo table has ...

How to retrieve the column names of a table using Web SQL?

Working on extracting column lists from Web SQL (Chrome's local database). One approach is to gather information from sqlite_master. SELECT name, sql FROM sqlite_master WHERE type="table" AND name = "'+name+'"; As an example, here is a sam ...

python comparing a list within a tuple

I need to compare a list and a tuple acquired from an SQLite query, in order to identify items in the list that are not included in the database tuple. Any items that are not present in the tuple should be added to a newJobs list. links = ["example. ...

Leveraging the power of sqlite3 alongside the flexibility of k

conn = sqlite3.connect('business_database.db') c = conn.cursor() c.execute("INSERT INTO business VALUES(self.nob_text_input.text, self.post_text_input.text, self.descrip_text_input.text )") conn.commit() conn.close() I am attempting ...

The paradox of code: Will it ever come back?

As someone who is new to Express, I am struggling to figure out why the code snippet below never seems to return. It just hangs there without any response. router.post('/post',function(req,res){ var file = "test.db" var exists = fs.exi ...

Storing Multi-Dimensional Arrays in Phonegap 1.0 for iOS 4.3+: A Comprehensive Guide

Working on a new iOS App built with HTML/CSS/JS(jQuery) + PhoneGap, I'm in need of loading a specific set of default records into local storage every time the application is opened. These records consist of multiple steps, each containing five sub-ste ...

Divide a table into two separate tables based on their index using Python and sqlite3

In my database.db file, I have a table named table1 with the following structure. The index values are strings, not numeric: id | item | price ------------- 45f5 | book | 20 25h8 | copy | 30 as34 | pen | 10 t674 | key | 15 5h6f | ring | 25 ...

Unable to retrieve data from Flask for AJAX request

When making an AJAX call to a Flask function to retrieve data using a token, the code looks like this: @app.route("/questgen/results", methods = ['POST', 'GET']) def fetch_results(): token = request.form.get('token&a ...

Explanation on retrieving JSON data from a ListView and passing it to another activity using SQLite in Android Studio

My goal is to navigate from the HOMESCREEN to a new activity, INTERNETSEARCHSCREEN, and then finally to the EDITINGSCREEN. I have successfully displayed JSON data on a listview but now I want to select a movie from the listview and display specific fields ...

Storing information from PHP into an Android database

I am trying to transfer data from MySQL to my Android SQLite Database using PHP. I have followed some online tutorials for guidance. My approach involves using a Database Adapter and a Database Helper in my code. Although I have made some progress, I am ...

An error occurred while trying to insert JSON data into SQLite using Python

I am currently working on a project where I need to store raw JSON strings in a sqlite database using the sqlite3 module in Python. Here is what I have attempted: rows = [["a", "<json value>"]....["n", "<json_value>"]] cursor.executemany("""I ...

Generating unique field names in Django using auto-increment

I am currently developing an application that involves creating a meal plan, specifically for a month. I am using Django, coding in python, and utilizing SQLite as the database system. One issue I am facing pertains to user input and databases. Rather than ...

Comparison of Saving JSON Data on Android: SQLite or SharedPreference

Looking to develop an application for members of my organization to access data on their mobile devices, I require a method to store pre-formatted data locally so it can be viewed offline. The data will be fetched using a JSON request-response. The respon ...

Leverage SQLite database in React-Native for Android development on Windows platform

I have been experimenting with a demo app in React-Native that includes the usage of SQLite Database. Following the instructions from this link, I tried running the command npm install --save react-native-sqlite-storage in my project's main repository ...

Database with socket capability for efficient memory storage

Python, SQLite, and ASP.NET C# are on my mind. I need an in-memory database application that doesn't store data to disk. Basically, I have a Python server receiving gaming UDP data, translating it, and storing it in the memory database engine. Avoid ...

An error occurred in Objective-C, as an unrecognized selector was sent to an instance of `__NSArrayM` when

I am facing difficulties inserting Json data into an SQLite database. The data retrieved from another class is stored in a dictionary (response.item), but I encounter an error stating 'unrecognized selector sent to instance' when trying to insert ...

Troubleshooting NPM installation failures with SQLite build

After updating to macOS Mojave and installing the latest versions of node 12.1.0, npm 6.9.0, brew 2.1.1, and Python 2.7.10 on darwin, I encountered an issue while running npm install in a package.json file for a project that includes "sqlite3": "4.0.6". ...

Tips for running multiple queries and consolidating the results in node.js with express and SQLite

Being relatively new to node and its family, I may make technical errors in my explanations. So please bear with me. I am currently developing a node API that needs to connect to an sqllite database and perform both an update and an insert query. I am cu ...

Retrieving SQLite Rows with Initial Timestamp after 1am Daily in Nodejs

When utilizing nodejs in conjunction with the node-sqlite3 library and working with a sqlite table that includes a column named timestamp containing timestamp strings like this: +-----------------------------------+--------+ + | timestamp ...

Platform Independent Data Storage Solution

Looking to create a Cross-browser compatible Web Application using HTML, JS, and CSS. In need of a robust database storage solution that can be queried on the client side using JS. While Web SQL/SQLite seems like a good option, it lacks support in IE. Does ...

Why is my class able to access information from another class without permission?

Just received an SQLite3 database that I will be querying with PHP. Wondering where exactly should I store this SQLite3 database so my PHP application can locate it? This is my first time working with SQLite3, but I'm guessing there must be a specific ...

The JSON data is being sent to the server via a single row

I have encountered an issue where I am attempting to send data from sqlite to the server as a json object. However, only one data row is successfully reaching the server. Here is my json code: JSONObject jobj = new JSONObject(); if (c.moveToFirst()) { ...

Struggling to transfer data from a Django database onto a website using the default authentication model and a custom model that I created, the latter of which I am unable to query

Seeking some assistance here as I am a new learner and encountering issues with retrieving data from my database. Utilizing the built-in authentication method from Django seems to be functioning fine as I can access user information. However, when attempti ...