sqlite

onItemClick gives index/ position of item on visible page ... not actual index of the item in list ..problem on enabling setTextFilterEnabled .. android

hi, I am creating a list .. the elements of the list are drawn from sqlite database .. I populate the list using ArrayList and ArrayAdapter ...upon clicking the items on the list I want to be able to fire an intent containing info about the item clicked ... info like the index number of the item .. using the method : onItemClick(Adapt...

iPhone SDK : Inserting data in tables generated by XCode

I created a data model (.xcdatamodel) in Xcode, which created .sqlite file. I can see that it has a created a few tables for metadata, alongwith a table called ZENTITY (my managed object is called entity). Can I insert data from the sqlite prompt instead of doing it programmatically? ...

XML Parsing: how to ignore whitespace or enter/return space

hi guys, i have an online xml file filled with items. At startup i check my internet connection, if so, i parse the xml and compare the item objects to those in my sqlite database. One of the item values is 'lastupdated', whichs is a php generated string. if the lastupdated value from the xml item is different from the value of the on...

How to test an iPhone application update?

I already have an iPhone application (version 1.0) available in the App Store and am ready to submit a newer version (version 1.1). How do I test the new upgrade to make sure that the current sqlite database and property list files on the earlier version do not get deleted/overwritten etc? The new version assumes the old data in both t...

How do I join three tables with SQLalchemy and keeping all of the columns in one of the tables?

So, I have three tables: The class defenitions: engine = create_engine('sqlite://test.db', echo=False) SQLSession = sessionmaker(bind=engine) Base = declarative_base() class Channel(Base): __tablename__ = 'channel' id = Column(Integer, primary_key = True) title = Column(String) description = Column(String) link = ...

Using a Context Menu to delete from a SQLite database in Android

Hi, I have created a list view that displays the names and dates of items stored in a SQLite database, now I want to use a Context Menu to modify these items stored in the database such as edit the name, delete, and view. This is the code for the list view: public void onCreate(Bundle savedInstanceState) { super.onCreate(saved...

Creating a "less"-like console pager interface for pysqlite3 database

I would like to add some interactive capability to a python CLI application I've writen that stores data in a SQLite3 database. Currently, my app reads-in a certain type of file, parses and analyzes, puts the analysis data into the db, and spits the formatted records to stdout (which I generally pipe to a file). There are on-the-order-...

Commit is VERY slow in my NHibernate / SQLite project

I've just started doing some real-world performance testing on my Fluent NHibernate / SQLite project, and am experiencing some serious delays when when I Commit to the database. By serious, I mean taking 20 - 30 seconds to Commit 30 K of data! This delay seems to get worse as the database grows. When the SQLite DB file is empty, com...

problem with sql query, variable value not inserting itself.

the old query works, the new on doesnt. the android logcat gives me error as: Failure 1: no such column abcname. abcname is the value of a editview that im trying to get from a popup in android. i know that the first query will insert those values in the fields, as they are given in single inverted commas. the same query, i typed in the...

Should I put the sqlite3 databases (for an RoR project) in the VCS?

What is the common way of dealing with the development.sqlite3 files with VCS (in particular, git)? If I commit this file to the VCS, will it be merged with another developer's copy? Or should each developer run the db:migrate task each time a new migration file is created? ...

Is there a way to update a database when installing/upgrading an app?

I have a main application, and a bunch of sub-applications (they are separate apps, which do not appear on the android home dashboard). I was planning on having a SQLite DB which the main app maintains, and get a list of available sub-apps from. Is there a way to update this main database as the user installs the sub-apps? Two alterna...

browse data in Android SQLite Database

Is there a way for an Android user to browse the SQLite databases on his/her phone and view the data in the databases? I use the SoftTrace beta program a lot. It's great but has no way that I can find to download the data it tracks to a PC. Thanks ...

Deleting SQLite rows automatically/periodically

Hi guys! So, i have a application that displays tasks and i created an option in the Settings menu that lets you choose in how many days all (Never, 10 days, 20 days or 30 days) these tasks should be automatically deleted. So when i open up the app there will be a method that will be called and check if theres any tasks to be deleted. I...

Download and Open Compressed SQLite3 Database on Heroku

I have a script file for parsing through a SQLite database. I now need to create a CRON job that will download and unzip said database from a third-party (already hosting as SQLITE). I understand this can be done using WGET and UNZIP, but given Heroku's read only file system, is this possible entirely in memory? Thanks. ...

How to update a string property of an sqlite database item

hi all, I'm trying to write an application that checks if there is an active internet connection. If so it reads an xml and checks every 'lastupdated' item ( php generated string ). It compares it to the database items and if there is a new value, this particular item needs to be updated. My code seems to work ( compiles, no error me...

Iphone: How to read return value of strftime SQLite function

I need to read the column value of the following query SELECT strtime('%Y-%m', created_at) as field FROM table GROUP BY field the type of column field is 3 (I assume it is blog), but I need string How should I? Updated const char* sql = "SELECT CAST(strftime('%Y', created_at) as INTEGER) as year FROM table GROUP BY year i...

Overlay only draws line between first 2 GPS points in Android

Hi, I am experiencing an unusual error using ItemizedOverlay in Android. I am creating a GPS tracking device that plots a route between waypoints stored in a database. When I provide the first two sets of longitude and latitude points through the emulator in Eclipse, it draws a red line just how I want it, but if I send another GPS p...

Finding the distance between 2 points in Android using Cursor and the distanceTo() method

Hello, I am trying to calculate the distance between the first GPS point stored in a SQLite database and the last GPs point stored. My code so far is this: private double Distance() { SQLiteDatabase db1 = waypoints.getWritableDatabase(); Cursor cursor = db1.query(TABLE_NAME, FROM, null, null, null, null,ORDER_BY); Cursor cursor1 = ...

Android: database reading problem throws exception

Hi, i am having this problem with the android database. I adopted the DBAdapter file the NotepadAdv3 example from the google android page. DBAdapter.java public class DBAdapter { private static final String TAG = "DBAdapter"; private static final String DATABASE_NAME = "PasswordDb"; private static final String DATABASE_TABLE = "myuse...

Why does clearing an SQLite database not reduce its size?

I have an SQLite database. I created the tables and filled them with a considerable amount of data. Then I cleared the database by deleting and recreating the tables. I confirmed that all the data had been removed and the tables were empty by looking at them using SQLite Administrator. The problem is that the size of the database fil...