Wrox Programmer Forums
|
BOOK: Professional Android 2 Application Development
This is the forum to discuss the Wrox book Professional Android 2 Application Development, 2nd Edition by Reto Meier; ISBN: 978-0-470-56552-0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Android 2 Application Development section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 13th, 2010, 02:31 PM
Authorized User
 
Join Date: Jul 2010
Posts: 15
Thanks: 2
Thanked 0 Times in 0 Posts
Default Chapter 10 Earthquake 2 - Live Folder error

I'm getting a force close when trying to open the live folder on the Home Screen. It is telling me that one of the column names does not exist. See initial part of error message below:

09-13 12:39:47.833: INFO/Database(448): sqlite returned: error code = 1, msg = no such column: name
09-13 12:39:47.922: ERROR/DatabaseUtils(448): Writing exception to parcel
09-13 12:39:47.922: ERROR/DatabaseUtils(448): android.database.sqlite.SQLiteException: no such column: name: , while compiling: SELECT * FROM earthquakes ORDER BY name ASC

Any ideas on how to resolve this?
 
Old September 13th, 2010, 02:41 PM
Authorized User
 
Join Date: Jul 2010
Posts: 15
Thanks: 2
Thanked 0 Times in 0 Posts
Default Updated code

I found the correct code on anther post:

Code:
static {
		uriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
		uriMatcher.addURI("com.paad.provider.earthquake", "earthquakes", QUAKES);
		uriMatcher.addURI("com.paad.provider.earthquake", "earthquakes/#", QUAKE_ID);
		uriMatcher.addURI("com.paad.provider.earthquake", "live_folder", LIVE_FOLDER)
}





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 7 Earthquake 2, Earthquake.java, error onActivityResult dbomberg BOOK: Professional Android 2 Application Development 2 November 30th, 2012 05:52 AM
Bug: Code Example Chapter 10 Earthquake 3 keling BOOK: Professional Android 2 Application Development 1 January 12th, 2012 05:03 PM
Chapter 9 - Earthquake - TimerTask Error IAmCorbin BOOK: Professional Android 2 Application Development 2 November 2nd, 2010 04:50 PM
Mapping Earthquake chapters 8-9-10 raychenon BOOK: Professional Android 2 Application Development 1 July 29th, 2010 06:29 PM
Chapter 10/Live Folder - UriMatcher not performing as expected. emanuel BOOK: Professional Android 2 Application Development 1 June 4th, 2010 05:52 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.