sqlite

How careful should I be with thread-safety when creating methods/activities which interact with SQLite database?

I am creating an app which allows for many different Activities to be started from a TabActivity(up to ~25). Most of the activities require data from the sqlite database, so when onCreate is run, an AsyncTask creates an SQLiteOpenHelper object(which will open a readable/writable database), runs a query, data is retrieved, and everything...

Garbled Text in uniqueidentifier in SQLite

Hi Dear All, I am having a problem using Sqlite with .Net/visual studio and need your help very much. The problem is: I have garbled text in the ID column with data type 'uniqueidentifier' in Sqlite Database when viewing table data via some GUI tools (I try different tools) It shows fine when retriving data in .net code, but just mak...

Sqlite Vs Documents Directory ......Which is best option

Hello, I have store some files (audio) in Documents Directory . I want to know which is better Option for storing NSData? Documents Directory or Sqlite? ...

update sql database with ContentValues and the update-method

Hello all, i would like to update my sql lite database with the native update-method of the SQLiteDatabase class of android. ContentValues dataToInsert = new ContentValues(); dataToInsert.put("name", "flo"); dataToInsert.put("location", "flotown"); String where = "id" + "=" + id; try{ db.update(DATABAS...

Dumping unreferenced pages in an sqlite file and re-referencing them.

Hi there! I got a damaged sqlite3 file with some pages referenced twice and some with zero references. I would like to know and dump these unreferenced pages and, if possible, manually re-reference them. The result of PRAGMA integrity_check; follows: "*** in database main *** On tree page 108 cell 0: 2nd reference to page 247 On tree p...

Pre-fill SQLite database with Core Data using Django

I'm wanting to build up a pre-filled sqlite database using Django as a front-end data entry inputter; however I've read this site and on StackOverflow that isn't that easy to do; and one needs to use CSV files. That's fine if your database is pretty small - but what if you're pre-filling it with data that has relationships (ie: Customer...

How to deploy a SQLite database table in Windows Mobile device ?

I am developing windows mobile application. I have added the SQLite database file in my project by using the Add Existing Item in visual studio. It gets deployed in the windows mobile emulator. I am also able to connect to the SQLite database through C#. When I perform the operations select, insert etc on the table of the SQLite database...

SQL Database Design - Cache Tables?

Hi there, What's a common/best practice for database design when it comes to improving performance on count(1) queries? (Im currently using SQLite) I've normalized my data, it exists on multiple tables, and for simple things I want to do on a single table with a good index -- queries are acceptably quick for my purposes. eg: SELECT c...

How to integrate Sqlite to Visual Studio?

I'm planning to use Sqlite but I don't know how to integrate it to visual studio or use it. Any help please... thanks. ...

Flex: sqlite last_insert_rowid over multiple insert calls

I have file with multiple SQL statements in it to be executed. INSERT INTO reports (a,b,c) VALUES (1,2,3); INSERT INTO units (report_id, e, f, g) VALUES ( (SELECT last_insert_rowid() FROM reports), 4, 5, 6); INSERT INTO elements (report_id, h, i, j) VALUES ( (SELECT last_insert_rowid() FROM reports), 7, 8, 9); The FROM reports secti...

Android JNI, is there any way C++ code can directly read the app's sqlite database?

I'm working on an Android app with a Java component and a C++ component via JNI. The C++ component is used on other platforms. It would make my life considerably easier if the C++ component could query the existing SQLite database (via the SQLite C API), without having to shell calls out to the Java side. I know it's a long shot, has a...

Removal of SQLite Database when Application is un-installed.

I'm creating an app that uses SQLite as a data storage on BlackBerry OS 5.0. When it is removed from a device, I'd like to be diligent and remove the database from the phone. Although I can seem to find out plenty of information on Persistant Storage being removed on the removal of an app, I can't find anything about an SQLite database....

DBConcurrencyException for SqliteDataAdapter in .Net

Hi Dear, I am dealing with SQLite with .net environment. When I use a TableAdapterManager to update a dataset, which is designed in the visual studio and contain "RowState is Deleted" rows, the ConcurrencyDBException occurr. If I go to the dataset designer and disable the optimistic concurrency option, it will works. But I don't want...

Reload CoreData DB

Hello, In some part of my app I replace the db.sqlite file used by CoreData to store all my app data but the loaded data doesn't change. I noticed that the new data is only shown when I restart the app. Maybe someone can explain-me why this happens and how to solve it. Thank you very much, ...

SQLite - Insert special symbols (trademark, ...) into table

How can I insert special symbols like trademark into SQLite table? I have tried to use PRAGMA encoding = "UTF-16" with no effect :( ...

SQLite - current_timestamp doesn't return the right hour?

In the SQLite IDE SQL window, I've written the instruction to return the the equivalence of .NET DateTime.Now, which is CURRENT_TIMESTAMP. Let's say it is 10:47:00 in local time, that is, GMT -4:00 (on summertime), otherwise it is GMT -5:00. The result of my query: select current_timestamp returns 2010-09-23 14:47:00, regardless of ...

SQLite Database creation for Android App

I am creating my SQLite database for my App at runtime if it does not exist and insert rows if it does. Since it is supposed to be created at runtime and I have implemented it by creating a subclass of SQLiteOpenHelper and overriding the onCreate() method - "Do I need to put anything in the /assets folder of my project?" I am not usin...

SQLite: accumulator (sum) column in a SELECT statement

Hi, I have a table like this one: SELECT value FROM table; value 1 3 13 1 5 I would like to add an accumulator column, so that I have this result: value accumulated 1 1 3 4 13 17 1 18 5 23 How can I do this? What's the real name of what I want to do? Thanks ...

importing CSV file into sqlite table

I've imported a CSV file into an sqlite table. everything went fine except it included quotes " " around the data in the fields. not sure why because there are no quotes in the CSV file. anyone know how to avoid this or get rid of the quotes somehow? Here's a screenshot from the firefox sqlite import settings I'm using: thanks for a...

No result on sqlite query

Hi all I create a table like that private static final String CREATE_TABLE_PRODUCT = "create table prod (id integer primary key,titre text not null, desc text, is_free integer);"; i update it this way SQLiteDatabase db = getConnection(); ContentValues updateEvent = new ContentValues(); updateEvent.put("is_free", 1); ...