sqlite

SQLite to NSMutableArray object

Hello all, I'm new to Objectiv-C and i try to get my database SQLite to work, but i get sommene trobble i hobe i can get sommen help here. That i will have my code to doe its bind all "region_title" to tableview, and "region_id" to the id like "html" when you use "options" i have try to search about it but i can't find help to my prob...

Set ListView Adapter with composite PRIMARY KEY in SQLite table

I've bound data from a SQLite database table to a ListView using a SimpleCursorAdapter. This works well when I use _id INTEGER PRIMARY KEY AUTOINCREMENT as my table's primary key. However, I'm trying to use a composite primary key such as the following: CREATE TABLE table ( column1, column2, column3, PRIMARY KEY (column1, column2)); F...

using a table in an sql condition without incorporating that table's contents into the results

Say I have four tables, users, contacts, files, and userfiles. Users can upload files and have contacts. They can choose to share their uploaded files with their contacts. When a user selects one or more of their uploaded files, I want to show a list of their contacts that they are not already sharing all of their selected files with. ...

Pylons / SQLAlchemy - ConfigParser.MissingSectionHeaderError: File contains no section headers

I've been working on a Pylons site and just now started to create my database. I made my User model class and then issued paster setup-app development.ini. Worked great. However, now when I try to paster serve --reload development.ini, I get the following error: ConfigParser.MissingSectionHeaderError: File contains no section headers. ...

Anything wrong with my code?

package one.two; import android.app.Activity; import android.database.Cursor; import android.os.Bundle; import android.view.View; import android.widget.AdapterView; import android.widget.SimpleCursorAdapter; import android.widget.Spinner; import android.widget.TextView; import android.widget.AdapterView.OnItemSelectedListener; public ...

how to get primary key column names for a given table ?

All I know is only table name, and id value on which I want to perform query, but I do not know what is id called in that table. ...

how to make a random selection from database

i am making a n application based on quiz therefore i need to select data randomly from database i m using sqlite please help ...

android sqlite insert problem with error code 19

Hi everybody! when I'm trying to run the ContentValues cv = new ContentValues(); cv.put(table_LocalSettings_Unit, input); mDb.insert(table_LocalSettings, "", cv); I got the following error: Error inserting unit = 0; SqliteConstraintException: error code 19 constraint failed. What should be the problem ? The table...

How do I use the current date to pull data to a label?

I'm trying to let the 'date' populate data to a label. Example: a work out schedule suppose today is August 5, so the label might read "do 20 pullups" and then on August 6, the same label might read "do 30 pushups". doesn't matter if the data is coming from an SQLite database or simple array.. I just can't figure out how to get the da...

SQLite3/Ruby statement question

Hello, I am trying to import a file as a table in SQLite 3 using a Ruby script. I need to assign a tab separator, and I used the following code: db = SQLite3::Database.new("meshdb2.db") db.execute("CREATE TABLE IF NOT EXISTS pubmed(id integer primary key,prideID INT NOT NULL,pubmedID VARCHAR(10) NOT NULL) db.prepare(".separator '\t'") ...

iPhone SQLite Database Reading And Writing

So I am trying to work with SQLite in one of iPhone applications and I am using the sqlite3 library. I am able to access the database and even make a query; in fact the query accesses the exact data but for some reason the string I am getting back is a long integer and not the string I was looking for. Here is the database and code: Fi...

NullPointerException error

My Logcat 08-06 01:27:34.874: ERROR/AndroidRuntime(721): Uncaught handler: thread main exiting due to uncaught exception 08-06 01:27:34.893: ERROR/AndroidRuntime(721): java.lang.NullPointerException 08-06 01:27:34.893: ERROR/AndroidRuntime(721): at one.two.Booking$MyOnItemSelectedListener.onItemSelected(Booking.java:53) 08-06 01:27...

Android sqlite exception,how to fix?

SQLiteDatabase database = SQLiteDatabase.openDatabase("/data/data/com.android.browser/databases/browser.db", null, 0); database.setLockingEnabled(true); database.delete("bookmarks", "_id=2", null); database.close(); error 08-06 05:53:45.769: ERROR/tt(958): android.database.sqlite.SQLiteException: error code 14: unable to open ...

books/links/samples on Microsoft Sync Framework for sqlite sync with sql 2008

Hi, i'm new to Microsoft Sync Framework and trying to synchronise an sqlite db with sql server 2008 and so fare I read about it on the following websites: http://sqlite.phxsoftware.com/forums/p/1381/6011.aspx http://www.vitalygorn.com/blog/post/2008/01/Microsoft-Sync-Framework-Support-in-Visual-Studio-2008.aspx http://www.codeproje...

Upgrade SQLite database from one version to another?

I am getting an error from Logcat saying that a certain column (in my SQLiteOpenHelper subclass) does not exist. I thought I could upgrade the database by changing the DATABASE_CREATE string. But apparently not, so how can I (step-by-step) upgrade my SQLite Database from version 1 to version 2? I apologize if the question seems "noobish"...

check whether the data is already exist in table, or to check table is empty

friends, I need help in sqlite query for check whether the data is already exist in table, or to check table is empty or not,let's give queries for it. Thanks in advance. ...

Database for record storage with revisioning

I've recently been tasked with improving a records database that consists of the following: All records are stored in one giant XML file. Any changes or updates to these records are done by hand within this XML file. Each record contains an 'Updated' datetime stamp to keep some form of revision control. The entire XML file is also ch...

A huge data storage problem

Hey guys! I'm starting to design a new application that will be used by about 50000 devices. Each device generates about 1440 registries a day, this means that will be stored over 72 million of registries per day. This registries keep coming every minute, and I must be able to query this data by a Java application (J2EE). So it need to ...

Increase the value of a record in android/sqlite database

I try to increase the value of an integer key in a row in my table. However, nothing really seems to happen. db.rawQuery("UPDATE table SET key = key + 1 WHERE name=?", new String[] {name}); However, this code works fine (just sets the key to a hard-coded value): ContentValues values = new ContentValues(); values.put("key", 2...

SQLite problem - works perfect in the 1.6 emulator - won't work on the phone (2.2) or 2.0+ emulator

I created a sqlite database to store playlists for a media player I am developing because of extended feature (rather than using the Content Provider). It works perfectly on the 1.6 emulator but FCs on anything higher than 2.0... what has changed that I need to know about as far as opening databases in SDK 2.0+? Here is the logcat. 0...