<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Using a SQLite Database in Android</title>
	<atom:link href="http://www.hdelossantos.com/2010/01/07/using-a-sqlite-database-in-android/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hdelossantos.com/2010/01/07/using-a-sqlite-database-in-android/</link>
	<description>Tales of the Wisconsin Experience</description>
	<lastBuildDate>Mon, 12 Jul 2010 07:18:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Noelle</title>
		<link>http://www.hdelossantos.com/2010/01/07/using-a-sqlite-database-in-android/comment-page-1/#comment-13628</link>
		<dc:creator>Noelle</dc:creator>
		<pubDate>Tue, 22 Jun 2010 02:34:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.hdelossantos.com/?p=518#comment-13628</guid>
		<description>If I have a stored data, and i want it to show in my list view, how would it be done? Is it similar? Cause yours is a hard code of inserting data.</description>
		<content:encoded><![CDATA[<p>If I have a stored data, and i want it to show in my list view, how would it be done? Is it similar? Cause yours is a hard code of inserting data.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wHiTeHaT</title>
		<link>http://www.hdelossantos.com/2010/01/07/using-a-sqlite-database-in-android/comment-page-1/#comment-13627</link>
		<dc:creator>wHiTeHaT</dc:creator>
		<pubDate>Mon, 21 Jun 2010 21:02:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.hdelossantos.com/?p=518#comment-13627</guid>
		<description>Hello Hanly, first of all, my respect for your coding skils.
As a total noob in programming in java, not even to mention for android, i managed to do the HelloWorld android tutorial (yeah right you might think).
I also found the droiddraw ( you can google it if you not now abouth it yet)desktop application , and managed to get a nice GUI for a &quot;simple app i want to create.
I assume i require sqlite for it.
As good tutorials are realy hard to find for android , i do a request for it here.
My intention is to create a form with multiple textfields.
In my case the textview names are related to metals.
For example:
Copper , stainless-steel,bronze,aluminium,led etc etc
Next to each of them i have a Edittext field.
Inside i want to add numeric value&#039;s like 200 , representing 200 KiloGrams .. after entering the value&#039;s i want to store them , and send true email.

So my request is simple i assume?
But to find such tutorial seems not , or is the notepad tutorial easyer as my request , ifso, then maby learning java is harder as i thought :(</description>
		<content:encoded><![CDATA[<p>Hello Hanly, first of all, my respect for your coding skils.<br />
As a total noob in programming in java, not even to mention for android, i managed to do the HelloWorld android tutorial (yeah right you might think).<br />
I also found the droiddraw ( you can google it if you not now abouth it yet)desktop application , and managed to get a nice GUI for a &#8220;simple app i want to create.<br />
I assume i require sqlite for it.<br />
As good tutorials are realy hard to find for android , i do a request for it here.<br />
My intention is to create a form with multiple textfields.<br />
In my case the textview names are related to metals.<br />
For example:<br />
Copper , stainless-steel,bronze,aluminium,led etc etc<br />
Next to each of them i have a Edittext field.<br />
Inside i want to add numeric value&#8217;s like 200 , representing 200 KiloGrams .. after entering the value&#8217;s i want to store them , and send true email.</p>
<p>So my request is simple i assume?<br />
But to find such tutorial seems not , or is the notepad tutorial easyer as my request , ifso, then maby learning java is harder as i thought <img src='http://www.hdelossantos.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy</title>
		<link>http://www.hdelossantos.com/2010/01/07/using-a-sqlite-database-in-android/comment-page-1/#comment-13626</link>
		<dc:creator>Jeremy</dc:creator>
		<pubDate>Fri, 11 Jun 2010 21:19:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.hdelossantos.com/?p=518#comment-13626</guid>
		<description>Hi.  Thank you for the demo.  I&#039;m unfortunately getting a runtime error &quot;Unable to instantiate activity ComponentInfo {projectPathStuff.MainActivity}:java.lang.ClassNotFoundException.

I checked the manifest and included the needed activities.  I don&#039;t know why I&#039;m getting this error.  Obviously, I&#039;m new to this.  Any advice would be greatly appreciated.</description>
		<content:encoded><![CDATA[<p>Hi.  Thank you for the demo.  I&#8217;m unfortunately getting a runtime error &#8220;Unable to instantiate activity ComponentInfo {projectPathStuff.MainActivity}:java.lang.ClassNotFoundException.</p>
<p>I checked the manifest and included the needed activities.  I don&#8217;t know why I&#8217;m getting this error.  Obviously, I&#8217;m new to this.  Any advice would be greatly appreciated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hanly</title>
		<link>http://www.hdelossantos.com/2010/01/07/using-a-sqlite-database-in-android/comment-page-1/#comment-13587</link>
		<dc:creator>Hanly</dc:creator>
		<pubDate>Sat, 20 Feb 2010 07:12:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.hdelossantos.com/?p=518#comment-13587</guid>
		<description>Hey Myreuki,

The column names are added in this portion of the code:

[code lang=&quot;java&quot;]
databaseKeys = new ArrayList&lt;String&gt;();
databaseKeyOptions = new ArrayList&lt;String&gt;();
databaseKeys.add(&quot;Title&quot;);
databaseKeyOptions.add(&quot;text not null&quot;);
[/code]

All you need to do is add new key values (column names) to the &lt;strong&gt;databaseKeys&lt;/strong&gt; ArrayList. You can also add options to the columns by adding values to the &lt;strong&gt;databaseKeyOptions&lt;/strong&gt; ArrayList.

As for querying data, you can look at DBAdapterTest.java
Essentially the following code is what you modify to get data back:

[code lang=&quot;java&quot;]
queryString = query.getData(new String[] {&quot;Title&quot;}, null, null, null, null, &quot;Title&quot;, &quot; ASC&quot;);
[/code]

Essentially you create an instance of DatabaseQuery, which your database adapter. then you use that to call the query method and pass it the options that you want the query to run with.

These are the parameters for the query method in order:

&lt;strong&gt;keys&lt;/strong&gt; is a String[] of the column headers to return in the results
&lt;strong&gt;selection&lt;/strong&gt; is a String to search for in the columns. Only columns with matching string are returned.
&lt;strong&gt;selectionArgs&lt;/strong&gt; is a String[] with arguments for the selection.
&lt;strong&gt;groupBy&lt;/strong&gt; is the String to group results by.
having is a filter to declare which row groups to include in the cursor.
&lt;strong&gt;sortBy&lt;/strong&gt; is a key to sort the results by.
&lt;strong&gt;sortOption&lt;/strong&gt; specifies the way to sort the data.

Hope this helps.</description>
		<content:encoded><![CDATA[<p>Hey Myreuki,</p>
<p>The column names are added in this portion of the code:</p>
<pre class="brush: java;">
databaseKeys = new ArrayList&lt;String&gt;();
databaseKeyOptions = new ArrayList&lt;String&gt;();
databaseKeys.add(&quot;Title&quot;);
databaseKeyOptions.add(&quot;text not null&quot;);
</pre>
<p>All you need to do is add new key values (column names) to the <strong>databaseKeys</strong> ArrayList. You can also add options to the columns by adding values to the <strong>databaseKeyOptions</strong> ArrayList.</p>
<p>As for querying data, you can look at DBAdapterTest.java<br />
Essentially the following code is what you modify to get data back:</p>
<pre class="brush: java;">
queryString = query.getData(new String[] {&quot;Title&quot;}, null, null, null, null, &quot;Title&quot;, &quot; ASC&quot;);
</pre>
<p>Essentially you create an instance of DatabaseQuery, which your database adapter. then you use that to call the query method and pass it the options that you want the query to run with.</p>
<p>These are the parameters for the query method in order:</p>
<p><strong>keys</strong> is a String[] of the column headers to return in the results<br />
<strong>selection</strong> is a String to search for in the columns. Only columns with matching string are returned.<br />
<strong>selectionArgs</strong> is a String[] with arguments for the selection.<br />
<strong>groupBy</strong> is the String to group results by.<br />
having is a filter to declare which row groups to include in the cursor.<br />
<strong>sortBy</strong> is a key to sort the results by.<br />
<strong>sortOption</strong> specifies the way to sort the data.</p>
<p>Hope this helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hanly</title>
		<link>http://www.hdelossantos.com/2010/01/07/using-a-sqlite-database-in-android/comment-page-1/#comment-13586</link>
		<dc:creator>Hanly</dc:creator>
		<pubDate>Sat, 20 Feb 2010 06:55:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.hdelossantos.com/?p=518#comment-13586</guid>
		<description>Sorry about that, you are absolutely right, it was a typo on my part. I&#039;ve fixed it and uploaded the new code.</description>
		<content:encoded><![CDATA[<p>Sorry about that, you are absolutely right, it was a typo on my part. I&#8217;ve fixed it and uploaded the new code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Myreuki</title>
		<link>http://www.hdelossantos.com/2010/01/07/using-a-sqlite-database-in-android/comment-page-1/#comment-13585</link>
		<dc:creator>Myreuki</dc:creator>
		<pubDate>Sat, 20 Feb 2010 05:19:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.hdelossantos.com/?p=518#comment-13585</guid>
		<description>Hey,
  Can anyone help me?  Im using this sample to help with the app im writing (new to java).  what would i need to do to have a database of 12 columns, and to query all or some of those columns?

thanks in advance.</description>
		<content:encoded><![CDATA[<p>Hey,<br />
  Can anyone help me?  Im using this sample to help with the app im writing (new to java).  what would i need to do to have a database of 12 columns, and to query all or some of those columns?</p>
<p>thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dm</title>
		<link>http://www.hdelossantos.com/2010/01/07/using-a-sqlite-database-in-android/comment-page-1/#comment-13584</link>
		<dc:creator>dm</dc:creator>
		<pubDate>Mon, 15 Feb 2010 21:59:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.hdelossantos.com/?p=518#comment-13584</guid>
		<description>it works after changing it to &#039;@+id/list&#039;</description>
		<content:encoded><![CDATA[<p>it works after changing it to &#8216;@+id/list&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dm</title>
		<link>http://www.hdelossantos.com/2010/01/07/using-a-sqlite-database-in-android/comment-page-1/#comment-13583</link>
		<dc:creator>dm</dc:creator>
		<pubDate>Mon, 15 Feb 2010 21:09:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.hdelossantos.com/?p=518#comment-13583</guid>
		<description>I&#039;m trying to test out this demo but I get an error..

ERROR Error: String types not allowed (at &#039;id&#039; with value &#039;+@id/list&#039;).


</description>
		<content:encoded><![CDATA[<p>I&#8217;m trying to test out this demo but I get an error..</p>
<p>ERROR Error: String types not allowed (at &#8216;id&#8217; with value &#8216;+@id/list&#8217;).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hanly</title>
		<link>http://www.hdelossantos.com/2010/01/07/using-a-sqlite-database-in-android/comment-page-1/#comment-13533</link>
		<dc:creator>Hanly</dc:creator>
		<pubDate>Wed, 13 Jan 2010 06:27:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.hdelossantos.com/?p=518#comment-13533</guid>
		<description>Thanks</description>
		<content:encoded><![CDATA[<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ajay</title>
		<link>http://www.hdelossantos.com/2010/01/07/using-a-sqlite-database-in-android/comment-page-1/#comment-13527</link>
		<dc:creator>Ajay</dc:creator>
		<pubDate>Tue, 12 Jan 2010 09:26:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.hdelossantos.com/?p=518#comment-13527</guid>
		<description>Very good demo..</description>
		<content:encoded><![CDATA[<p>Very good demo..</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.485 seconds -->
