Sqlite iPhone: Repeating Rows in Each Section of Grouped UITableview

I'm trying to learn how to use the UITableView in conjunction with a SQLite back end. My issue is that I've gotten the table to populate with the records from the database, however I'm having a problem with the section titles. I am not able to figure out the proper set up for this, and I'm repeating all tasks under each section. The table looks like this. The groups field is where I'm trying to pull the section title from. TaskID groups TaskName sched lastCompleted nextCompleted

sqlite3 - Exception: database disk image is malformed

i'm working with IronPython 2.6 for .Net4 and sqlite3 module from: IronPython.SQLite. i have a written a GUI program what runs in four frames of an MDI window. Every of the four programs receives data from a serialport and stores this data in a sqlite database. One database per program. Between inserting this data on receive into the database the program querys the database every 100ms for the latest data items. I'm already using a mutex call for the cursor.execute() command to prevent problem

add new column using SQLite

I am trying to insert a new column in a R dataframe using sqldf, using the example 4 from sqldf abbr <- data.frame (species = levels(iris[,"Species"]), abbr = c("s","ve","vi")) sqldf("select abbr, avg(Sepal_Length) from iris natural join abbr group by species") sqldf("select abbr, avg(Sepal_Length) from iris join abbr using(Species) group by Species") Both sqldf command works, but it fails when I change the column name of abbr from abbr to abbr_col, I don't know which

Sqlite .schema for postgres

I'm migrating a database from sqlite3 to postgres and am wondering if there are any short tutorials that can teach me the new syntax. Also, as a short term question, how do I see the schema of a postgres table which is equivalent to .schema in sqlite?

Test for changes in sqlite database

I have an application that works with an sqlite database. I'd like to run this application, make some operation in the application (e.g. click a button) and then see what has changed in the database. I'd like to see everything that changed ofter this operation. Is it possible in sqlite to save a state somehow and after a few minutes view the differences (old state versus new state)? thank you

In PyCharm's Data sources unable to connect to sqlite3 databases

In my PyCharm (2.0 Beta 2) on my Windows 7 machine, however I am not able to load the contents and schema of sqlite3 databases. I downloaded to a directory both the two sqlite drivers: sqlitejdbc-v056.jar from Zentus and to be on the safe side the one from Xerial sqlitejdbc-3.7.2. The JDBC driver class is set to org.sqlite.JDBC The database URL is set to: jbdc:sqlite:c:/Users/Myself/path/to/db.db No username or password. When I hit "Test Connection" all is well and "Connection Successful

Sqlite Storing and downloading Data in iOS Applications

I am a bit new to iOS Development and I was wondering if someone could point me in the right direction regarding an application I am working on. I am currently working on an application that will be displaying product lists and categories. The list is updated on a weekly basis (one every week). I am now trying to decide two things: 1- What's the best method of storing this data, I am looking for a way that will allow me to replace the data in the application once every week. 2- Is it going to

Can I prevent automatic generation of ROWID in SQLite?

As far as I know, SQLite generates ROWID automatically. (regardless to it's AUTOINCREMENT or now) But I want to supply ROWID explicitly, and raise an error if ROWID is not specified on INSERT. Instead of automatic generation. Is this possible and how can I do this?

Sqlite Choosing Embedded Linux for device

I am starting to create a QT application with sqlite for a hand held device. My Project Manager asks me to select an operating system (embedded linux) for the device (we are not considering android). As in Desktop, are there many embedded-Linux distributions for devices? If so, Which embedded linux I should consider?

SQLite Multi-column Insert/Replace with Multiple Join

Sorry for the poor title. I have a query (below) that executes properly and creates an insertion just as I would desire. However, I want to make it smarter by only inserting when the exact combination of three columns. Essentially, the three column tuple is a primary key, but I'm working with the limitation of sqlite's single primary key. Basic Context I have 4 tables: Permissions, Roles, Users, Actions Permissions connects Roles and Users to Actions. The Actions table has a list of availa

Sqlite database restrictions in windows store apps

I have some issues with Sq lite. I read a Microsoft article In that site it is mentioning as "When you create a new C# or VB Windows Store project in Visual Studio, it supports all architectures (x86, x64 and ARM) by default. But since you added Sq Lite to the project, you can’t build one package that targets all architectures. You have to build one target for each. Select Build|Configuration Manager and select x86, x64 or ARM from the Platform drop-down list." My application is Newspaper app

String storage size in sqlite

After using lots of SQL Server and SQL Server Compact, I have recently started to use Sqlite. I'm currently creating tables in Sqlite and have noticed that there doesn't seem to be any need to input the string length limit when defining string columns. In SQL Server a 255-character string datatype is defined like: varchar(255). In SQL Server Compact it is defined like: nvarchar(255). However, in Sqlite, it appears that the column datatype can be defined simply as text, without inputting any siz

Which versions of SQLite does Zumero work with under Xamarin?

I am exploring Zumero for a new project and attempting to understand which SQLite it works with. Mono.data.sqlite, System.data.sqlite, Sqlite-net, or Sqlite-net Extensions. I prefer to use the Extensions version however I suspect that it will not work with it or the Sqlite-net because I would be unable to define the tables using the modified Zumero syntax. I do need to be able to sync multiple smart devices with themselves and with desktop. Any ideas would be helpful.

FMDB set up a collation sqlite3_create_collation

I'm trying to do a search into my app BBDD that contains accented words. My goal is to achieve searches with and without the accent. I.E. If I search for: "Introducción" I would like get results with "Introducción" and "Introduccion". I've read that I could accomplish this setting up a new collation but I cant find how do it. It's possible? In other post I've read it said that I should to create a new LIKE function, but again, I don't know how can do it. If someone could help me, I'd appre

Sqlite Can this Rust code be written without the "match" statement?

linuxfood has created bindings for sqlite3, for which I am thankful. I'm just starting to learn Rust (0.8), and I'm trying to understand exactly what this bit of code is doing: extern mod sqlite; fn db() { let database = match sqlite::open("test.db") { Ok(db) => db, Err(e) => { println(fmt!("Error opening test.db: %?", e)); return; } }; I do understand basically what it is doing. It is attempting t

Wrong autoincrement value in sqlite using JPA

I'm working on a simple project using sqlite, JPA and eclipseLink. First I create my Person table in my database with this: CREATE TABLE Person ( idPerson INTEGER PRIMARY KEY AUTOINCREMENT, firstname TEXT DEFAULT 'NULL', birthdate DATETIME DEFAULT 'NULL' ) and then add a new test entry (in order to generate the sqlite_sequence table) INSERT INTO [Person] ([firstname], [birthdate]) VALUES ('Foo', '1145-11-12 00:00:00') All the successive insertion are done using JPA, where i

How to substitute part of date string with table.field value in sqlite3?

I have the following 2 tables: CREATE TABLE count (nbr int not null); and CREATE TABLE day (day int not null); Table count has 3 records with field values: 1 2 3 Now I want to insert a calculated date in table day based on the current date and a value from table count with the following statement: insert into day values (date('now', '+'(select nbr from count where nbr=1) 'day')); No matter what I change and (re)try in the statement I keep getting 'Syntax error' messages or the message

Sqlite Library for Python

Is there any link to download SQLite Library for Python 2.7? I'm particularly interested in working with a SQLite Library for Python.i tried googling it , but the links provided are not actually links to SQLite Library ,most of them is to download the SQLite. any help would be appreciated.

CoreData database not showing in sqlite since moving to Xcode 5

I have an app that uses a CoreData database the contents of which I view using sqlite. The database path is the same: /Users/Comp1/Library/Application Support/iPhone Simulator/7.0.3/Applications/16226A0A-575C-4356-BFAA-6B1A009C0585/Documents and I can see the database file. But when I open it in sqlite there appears to be no data, although I can read through the app. It was working fine until I loaded Xcode 5. Does anyone know why this might be? No tables shown:

Saving an ALAsset to SQLite3 database - retrieve error

I'm trying to save a list of assets to upload in a sqllite3 db, but when i parse the database and set the assets to an array, then try to use the asset i get a SIGABRT error. ALAsset *asset = (ALAsset *) assets[indexPath.row]; cell.textLabel.text = [NSString stringWithFormat:@"image%d: ready to upload.",indexPath.row]; cell.detailTextLabel.text = @"1.3MB to folder <server folder>"; [[cell imageView] setImage:[UIImage imageWithCGImage:[asset thumbnail]]];// SIGABRT ERROR Im saving the AL

Fast search on a blob starting bytes in SQLite

Is there a way to index blob fields and have the index used for beginning of blob searches? Currently I have hashes stored as hexadecimal in text fields. These hashes in hexadecimal form are 32 characters long, and form the bulk of the data in the database. Problem is, they are often searched by their starting bytes, as in select * from mytable where hash like '00a1b2%' I would like to store them as blobs, as this saves about 30% of the database size. However while select * from mytable wh

How does sqlite3_step() work?

I have a query that I'm running that executes in a tenth of a second but it then takes me many seconds to iterate through sqlite3_step(); I'm used to running mysql on a server where the query runs in a specific amount of time and don't understand how sqlite_step() is working. Is the query done over a length of time as I iterate? How does this work with grouping statements? Or is it just returning the rows incrementally from memory/io reasons? Is most of the work done during the initial statement

How to add specific string to existing string in SQLite?

My column pattern as below. <3CHARS>:<3CHARS>:<3CHARS>:1-<Not-Static-String> <3CHARS>:<3CHARS>:<3CHARS>:7-<Not-Static-String> etc... I would like to insert 0 before 1 like this; <3CHARS>:<3CHARS>:<3CHARS>:01-<Not-Static-String> <3CHARS>:<3CHARS>:<3CHARS>:07-<Not-Static-String> I have tried to use CONCAT but didn't write correct SQL

Write sqlite3 in-memory database into file using clsql

As the question indicates. I created an in-memory database using ":memory:" and clsql:with-database to increase write/insert-query performance. But in the end I do want to have a permanent copy of the filled database on my hard drive. It should look something like this: (clsql:with-database (db (":memory:") :database-type :sqlite3) ;;entering db-scheme ;;entering a bunch of data (magically-write-database-to-file db file-path)) How can I achieve this?

Sqlite Query working in Resultset but not jasper report

The following Query works when i directly execute in database and even in java project resultset but does not works in Ireport, i suspect problem is count and sum funtions as when i remove them it works fine .. Select ISBN,BookTitle,Author1,Author2,Author3,Category,Edition,Publisher,PublishingYear,Price,BookSelfName,Volume,Language,Subject, sum(case when status='Available' then 1 else 0 end) as Available, count(*) as Total from Book group by ISBN, BookTitle Error is Error:General Problem:nul

Writing to SQLite DB while transaction in another connection is opened

I have a Firefox addon which uses SQLite DB to store data (with a help of wrapper around mozIStorageConnection. Addon has an options window which is used to manipulate with most of the add-on data. Users asked to add opportunity to cancel changes they make in that window. In order to implement this for data in DB I used "load" event handler for window which looks like the following: window.addEventListener('load', function() { //... // conn is mozIStorageConnection instance. conn.

SQLite Efficient Running Total

I have a table of transactions in SQLite number date Category Amount runningBalance I want the running balance column to have a running sum of the amount column after the table is sorted by Date first and number second. I can do this with a select when reading. But this table has the potential to get very large and I don't want to recalculate every time. I want to make a trigger where all the transactions following (by date then number) the inserted/edited transaction have their runn

Dynamic sqlite column alias

I am doing something like this: SELECT date('now'); And it will give me a result set like this: date('now') ----------- 2015-05-16 What I want to be able to do is alias the date('now') to the evaluated expression, 2015-05-16, so my result would look like this: 2015-05-16 ----------- 2015-05-16 If I just try SELECT date('now') as date('now'); That won't work. From what I can see in the documentation that is by design. Is there any other way I can accomplish this?

Repetition of data for import_from_csv_file() in web2py for sqlite database table

I want to load data from csv file into SQlite database. My code is : Model: db.define_table('data_table', Field('Title',requires =IS_NOT_EMPTY()), Field('Link',requires =IS_NOT_EMPTY())) db.data_table.import_from_csv_file(open('mycsv'),'rb') Controller: def index(): query=((db.data_table.id)) fields = (db.data_table.id, db.data_table.Title, db.data_table.Link) headers = {'data_table.id': 'ID', 'db.data_table.Title': 'Title', 'db.data_ta

Sqlite How to make left outer join over inner join?

I want to make view (catalog_view), which makes inner join between contacts_categories_table and contacts_table (contacts must exist), then left outer join result with categories table (category may not be assigned). As contacts_categories_table has 156 recoreds, I expect catalog_view to containe 176 recoreds too. However, i get 3003 records in catalog_view. Where did I make error? catalog_view CREATE VIEW IF NOT EXISTS catalog_view AS SELECT contacts_table._id AS _id,

Sqlite Compiling a .cpp file with a .o (object file)

I was trying to use some sqlite3 and then I couldn't compile it with g++. I have learned from another question that said I have to make the sqlite3.c file into sqlite3.o file. I did that with gcc. Now I have my source code as test.cpp and sqlite3.o. How to compile them together with g++?

Sqlite SQLAlchemy data not consistent across connections

I have a couple python apps (separate processes) that both use Flask-SQLAlchemy to access a sqlite database. One of them is set up using the asyncio module (but is still a Flask app) and the other is a Flask-RESTful API. I'm seeing an issue in which data written to the database by the Flask-RESTful API is not being seen by the asyncio app. I've read that this is likely due to isolation levels (How to disable SQLAlchemy caching?). If I use session.expire_all() the issue goes away. So is this re

Sqlite I want to populate a ttk.combobox with results from database query

i am having a little problem i would need help with.This concerns python ttk.combobox widget I am new to python just started coding a week ago. I have a database which is populated by user input.This database is to store a user's stock input(e.g. items, cost, supplier ,etc).This part i have been able to do. From the database, am using a 'for' loop to get each seperate item from my database query into a ttk.combobox so a user can make selections. However my problem is,i get an error everytime. I

Sqlite Sqllite search column name in db

I have a db in sqllite and it has almost 140 tables and many columns. And I don't know which table contain what column I have a specific requirement to search for specific column name . For example I have a database called msg. And it has almost 100 tables after lots of try I am unable to find exact column name like I am searching for localid in db from all table. I am using Sqllitestudio to see the db. My question is can I search for just a column name and in which table or in how many table

SQLite timestamp conversion

I have been looking for a solution for certain timestamps I have in a database I have the following timeStamp: 17914 how do I convert it to a date in SQLite? The correct date is 2019-01-18

How can i get results of this sqlite query?

CREATE TABLE [test] ([id] INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,[col1] TEXT NULL,[col2] TEXT NULL,[col3] TEXT NULL,[col4] TEXT NULL); INSERT INTO test (col1,col2,col3,col4)VALUES ('A','B','C','D'); INSERT INTO test (col1,col2,col3,col4)VALUES ('D','B','D','D'); INSERT INTO test (col1,col2,col3,col4)VALUES ('A','B','A','D'); INSERT INTO test (col1,col2,col3,col4)VALUES ('B','C','B','B'); INSERT INTO test (col1,col2,col3,col4)VALUES ('A','B','D','D'); INSERT INTO test (col1,col2,col3,co

SQLITE: how can I turn the rowid column into a regular column

Let's say I create a table & insert a row by doing: CREATE TABLE people (first_name text NOT NULL, last_name text NOT NULL ); INSERT INTO people (first_name, last_name) VALUES ('John', 'Doe'); I can execute: SELECT rowid as ID, first_name, last_name FROM people and get back three columns of data as expected. However, let's say I wanted to turn the automatic rowid column into a regular column so the IDs of the rows do not change as they are removed, etc. How can I do this? What I ha

Selecting a random record in SQLite from records that have a specific value to a column

I am making an application in Android, and I am using SQLite database. Is it possible for me to select a random record in a table from the records that have a specific value to one of the columns? Let’s say I have a table called T, which has a set of columns: a, b, c. Can I select a random record from this table, but ONLY from the records with no null value for the “c” column?

sqlite timecode calculations

I have two tables which I export from my video editing suite, one ("MediaPool") containing a row for each media file imported into the project, another ("Montage") for the portions of that file used in a specific edit. The fields that are associated between the two are MediaPool.FileName and Montage.Name, which are very similar (Filename only adds the file extension). # MediaPool Filename | Take --------------------------------- somefile.mp4 | Getty file2.mov | Associated Press f

In-memory SQLite context throws "no such table" exception

I try to use In-memory SQLite database to improve my unit tests, my test looks like [Fact] public void CreateSampleType() { var sampleType = new SampleType("Type One"); var options = new DbContextOptionsBuilder<SamplesContext>() .UseSqlite("DataSource=:memory:") .Options; using (var context = new SamplesContext(options)) { context.Database.EnsureCreated(); context.SampleType.Add(sampleType); context.SaveChanges(); }; }

Sqlite Tkinter python 3.7 AttributeError: 'Button' object has no attribute 'get'

I'm writing an inventory database program. I'm a novice so I'm sure I have something wrong. def select_item(): #Create a Database or Connect to one conn = sqlite3.connect('inventory.db') #Create Cursor c = conn.cursor() a = id_select.get() c.execute("SELECT * FROM inventory WHERE oid = " + a) records = c.fetchall() for record in records: Item_editor.insert(0, record[0]) Quantity_editor.insert(0, record[1]) Asset_tag_editor.insert(0, re

Sqlite Firestore Collection (with Subcollection) to Sqflite Item in Flutter

My application is using firestore database. I design categories and its subcategories of the content by using subcollection. To make offline mode feature; I want to save this firestore data to sqflite database. I learned that I convert firebase data map to text for sqlite But I counl't find a way to locate the subcollections. var catagorySnapshots = await _firestore.collection("categories").getDocuments(); List _list = []; catagorySnapshots.documents.forEach((_snapshot) {

Did FireDac SQLite change in Delphi 10.4?

My Delphi project has never used the actual sqlite3.dll but rather uses the embedded library. I recompiled the project with 10.4 and sent it to testers who are seeing this error: Exception EFDException in module ChessOpeningsWizardProfessional2016.exe at 007C6FDC. [FireDAC][Phys][SQLite]-314. Cannot load vendor library [sqlite3.dll or libdb_sql51.dll]. The specified module could not be found Hint: check it is in the PATH or application EXE directories, and has x86 bitness. It runs fine on my

Sqlite How do I include all max values within a row?

I'm very new to learning SQL, I apologize if my question isn't completely accurate. The question I'm trying to answer with this query is "What is the most popular music genre in each country?" I've had to use a subquery and it works, but I found that for a few countries in the table, more than one genre has the MAX value. I'm stuck with how to edit my query so that all genres with the max value show in the results. Here is my code, using DB Browser for SQLite: SELECT BillingCountry AS

Sqlite Delete rows using NOT IN

How can I do a delete in flutter using NOT IN() ? I have tried few ways but the app is always crashing : either it's closing the app with zero error or message : ** await db.rawDelete('DELETE FROM ' + dao.tableName + ' WHERE ' + dao.columnUuid + ' NOT IN (' + params.join(',') + ')'); ** or it gives me *Invalid argument ['2e73c330-1312-42fa-ad3b-d762f96b5ec7', '1ba3e7e3-2d57-4916-9ea5-2624432cf60c'] with type List. Only num, String and Uint8List are support

JavaFx with SQLite deployment using JPakcage: App Doesnt load upon installation

So I'm trying to deploy a JavaFX (with SQLite) Desktop Application I'm using open-JDK-16, java SDK-16, and SQLite.3.20.1 JDBC driver I'm working on Intellij IDEA(2020.3.2 Community Edition) and when I run my code it works fine If the database file does not exist, one will be created and a table inside it too will also be created and populated with some data see my project folder. Upon deployment with JPackage an installer is created successfully and I can install it with no issues But when

Some database fields are not saved in sqlite flutter, how to check in DB?

Some fields are not loading back in flutter app once I save them and load back. While saving I am able to see the maps, it is correct only. So, I want to check that load that sqlite db file. For that, I kept a text field and ran the emulator. But, when I ran the same on my mobile, it is not showing the db file path. Can you explain how to get that file from the mobile(Oneplus 8t)?

  1    2   3   4   5   6  ... 下一页 最后一页 共 48 页