<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-797</id>
	<title>Nabble - SQLite</title>
	<updated>2009-11-29T06:49:36Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/SQLite-f797.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/SQLite-f797.html" />
	<subtitle type="html">SQLite is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine.</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26562672</id>
	<title>WHERE CLAUSE in UNICODE</title>
	<published>2009-11-29T06:49:36Z</published>
	<updated>2009-11-29T06:49:36Z</updated>
	<author>
		<name>Irshad Alam</name>
	</author>
	<content type="html">I want to use WHERE Clause for unicode search in database. Let me clear more about my requirement. Suppose I've a database whose table name is employee having name, age and salary as three columns.
&lt;br&gt;&lt;br&gt;Now I want to make query on employee table which gives the result having names start between 'D' and 'M', so probable I'll do something &amp;quot; SELECT * FROM employee WHERE name BETWEEN 'd%' AND 'n%' &amp;quot;. But this is very specific if I know the characters. I want to avoid using the character and use unicode for making the query which means rather than using 'd%' and 'n%', I wish to use unicode values[D --&amp;gt; U+0044] and [M --&amp;gt; U+004d].
&lt;br&gt;&lt;br&gt;Please let me know how to acheive this.</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/WHERE-CLAUSE-in-UNICODE-tp26562672p26562672.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26562315</id>
	<title>Re: Moving Average?</title>
	<published>2009-11-29T06:02:01Z</published>
	<updated>2009-11-29T06:02:01Z</updated>
	<author>
		<name>Igor Tandetnik</name>
	</author>
	<content type="html">npearson99 wrote:
&lt;br&gt;&amp;gt; I'm just trying to get some of the analytic functions to work, but I keep
&lt;br&gt;&amp;gt; getting a syntax error. &amp;nbsp;I got this from a sql wiki page, so I hope
&lt;br&gt;&amp;gt; something like this will work.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; select sum(salary) over
&lt;br&gt;&amp;gt; (partition by months order by minutes rows between unbounded preceding and
&lt;br&gt;&amp;gt; current row)
&lt;br&gt;&amp;gt; from tblSalaryData
&lt;br&gt;&lt;br&gt;As Simon mentioned, SQLite doesn't support anything remotely similar to this syntax. My best guess at what you are trying to do here is something like this:
&lt;br&gt;&lt;br&gt;select months, minutes,
&lt;br&gt;&amp;nbsp; (select sum(salary) from tblSalaryData d2
&lt;br&gt;&amp;nbsp; &amp;nbsp;where d2.months = d1.months and d2.minutes &amp;lt;= d1.minutes)
&lt;br&gt;from tblSalaryData d1;
&lt;br&gt;&lt;br&gt;Igor Tandetnik
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;sqlite-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26562315&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Moving-Average--tp26559410p26562315.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26561798</id>
	<title>Re: Detecting and creating corrupt files</title>
	<published>2009-11-29T04:58:01Z</published>
	<updated>2009-11-29T04:58:01Z</updated>
	<author>
		<name>Kees Nuyt</name>
	</author>
	<content type="html">On Sun, 29 Nov 2009 10:31:29 +0000, Ben
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26561798&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite_list@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;Hi all,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;I write an SQLite browser for macs, and someone recently brought to my &amp;nbsp;
&lt;br&gt;&amp;gt;attention that it doesn't handle corrupt database files very well. &amp;nbsp;
&lt;br&gt;&amp;gt;I've read the pages on pragmas for integrity checking and how locking &amp;nbsp;
&lt;br&gt;&amp;gt;problems can cause corruption, but am looking for something a bit &amp;nbsp;
&lt;br&gt;&amp;gt;different:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;1. Are there detectably different ways for a database to become &amp;nbsp;
&lt;br&gt;&amp;gt;corrupt? Or is SQLITE_CORRUPT the only one?
&lt;br&gt;&amp;gt;2. Is there an easy way for me to create a couple of corrupt databases &amp;nbsp;
&lt;br&gt;&amp;gt;for testing? I was thinking that opening a database file in a text &amp;nbsp;
&lt;br&gt;&amp;gt;editor and swapping bits around would do it, but wondered if this &amp;nbsp;
&lt;br&gt;&amp;gt;would produce different symptoms than a file 'properly' corrupted &amp;nbsp;
&lt;br&gt;&amp;gt;through accidental damage.
&lt;/div&gt;&lt;br&gt;&lt;a href=&quot;http://www.sqlite.org/lockingv3.html#how_to_corrupt&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sqlite.org/lockingv3.html#how_to_corrupt&lt;/a&gt;&lt;br&gt;&lt;br&gt;Also, the testsuite (part of the SQLite source tree)
&lt;br&gt;contains some code to corrupt a database.
&lt;br&gt;&lt;br&gt;&amp;gt;Thanks,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Ben Barnett
&lt;br&gt;-- 
&lt;br&gt;&amp;nbsp; ( &amp;nbsp;Kees Nuyt
&lt;br&gt;&amp;nbsp; )
&lt;br&gt;c[_]
&lt;br&gt;_______________________________________________
&lt;br&gt;sqlite-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26561798&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Detecting-and-creating-corrupt-files-tp26560788p26561798.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26560788</id>
	<title>Detecting and creating corrupt files</title>
	<published>2009-11-29T02:31:29Z</published>
	<updated>2009-11-29T02:31:29Z</updated>
	<author>
		<name>Ben-273</name>
	</author>
	<content type="html">Hi all,
&lt;br&gt;&lt;br&gt;I write an SQLite browser for macs, and someone recently brought to my &amp;nbsp;
&lt;br&gt;attention that it doesn't handle corrupt database files very well. &amp;nbsp;
&lt;br&gt;I've read the pages on pragmas for integrity checking and how locking &amp;nbsp;
&lt;br&gt;problems can cause corruption, but am looking for something a bit &amp;nbsp;
&lt;br&gt;different:
&lt;br&gt;&lt;br&gt;1. Are there detectably different ways for a database to become &amp;nbsp;
&lt;br&gt;corrupt? Or is SQLITE_CORRUPT the only one?
&lt;br&gt;2. Is there an easy way for me to create a couple of corrupt databases &amp;nbsp;
&lt;br&gt;for testing? I was thinking that opening a database file in a text &amp;nbsp;
&lt;br&gt;editor and swapping bits around would do it, but wondered if this &amp;nbsp;
&lt;br&gt;would produce different symptoms than a file 'properly' corrupted &amp;nbsp;
&lt;br&gt;through accidental damage.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;&lt;br&gt;Ben Barnett
&lt;br&gt;_______________________________________________
&lt;br&gt;sqlite-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26560788&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Detecting-and-creating-corrupt-files-tp26560788p26560788.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26560246</id>
	<title>Re: Moving Average?</title>
	<published>2009-11-29T00:58:38Z</published>
	<updated>2009-11-29T00:58:38Z</updated>
	<author>
		<name>Simon Slavin-3</name>
	</author>
	<content type="html">&lt;br&gt;On 29 Nov 2009, at 5:08am, npearson99 wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; select sum(salary) over 
&lt;br&gt;&amp;gt; (partition by months order by minutes rows between unbounded preceding and
&lt;br&gt;&amp;gt; current row)
&lt;br&gt;&amp;gt; from tblSalaryData
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I get an error by partition. &amp;nbsp;I know this doesn't give me the moving
&lt;br&gt;&amp;gt; average, I'm just trying to get the &amp;quot;over&amp;quot; statement part to register.
&lt;br&gt;&lt;br&gt;That's Oracle, not standard SQL. &amp;nbsp;It will work only in Oracle. &amp;nbsp;SQLite may be able to do the same thing but I don't understand enough about what you wrote to even make a guess how to do it.
&lt;br&gt;&lt;br&gt;Simon.
&lt;br&gt;_______________________________________________
&lt;br&gt;sqlite-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26560246&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Moving-Average--tp26559410p26560246.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26559559</id>
	<title>Re: SQLite database for google maps</title>
	<published>2009-11-28T21:54:14Z</published>
	<updated>2009-11-28T21:54:14Z</updated>
	<author>
		<name>Rafał Pocztarski</name>
	</author>
	<content type="html">2009/11/28 logan &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26559559&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;logan04x@...&lt;/a&gt;&amp;gt;:
&lt;br&gt;&amp;gt; I'm trying to find if someone has got a database of Google maps for a
&lt;br&gt;&amp;gt; particular town in an SQLite file. I'm looking to write an application
&lt;br&gt;&amp;gt; which will query this database and find text directions. This is more
&lt;br&gt;&amp;gt; of a fun project for me than anything else, so I welcome all
&lt;br&gt;&amp;gt; suggestions if doing so is possible or not. My target platform is
&lt;br&gt;&amp;gt; Symbian.
&lt;br&gt;&lt;br&gt;This is slightly off-topic as it's not an SQLite question at all, but
&lt;br&gt;if you have internet connection on your target device then you might
&lt;br&gt;try to use the Google Maps or Yahoo Maps APIs:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://code.google.com/apis/maps/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/apis/maps/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://developer.yahoo.com/maps/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://developer.yahoo.com/maps/&lt;/a&gt;&lt;br&gt;&lt;br&gt;You may also take a look at the Yahoo Query Language which you can use
&lt;br&gt;to access web services using an SQL-like query language:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://developer.yahoo.com/yql/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://developer.yahoo.com/yql/&lt;/a&gt;&lt;br&gt;&lt;br&gt;Now going back on topic, SQLite can be used to cache some of the data
&lt;br&gt;if it doesn't violate the terms of service of whatever service you
&lt;br&gt;decide to use.
&lt;br&gt;&lt;br&gt;Rafał Pocztarski
&lt;br&gt;_______________________________________________
&lt;br&gt;sqlite-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26559559&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/SQLite-database-for-google-maps-tp26552745p26559559.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26559410</id>
	<title>Moving Average?</title>
	<published>2009-11-28T21:08:29Z</published>
	<updated>2009-11-28T21:08:29Z</updated>
	<author>
		<name>npearson99</name>
	</author>
	<content type="html">I'm trying to calculate a moving average in sqlite through sqliteman.
&lt;br&gt;&lt;br&gt;I'm just trying to get some of the analytic functions to work, but I keep getting a syntax error. &amp;nbsp;I got this from a sql wiki page, so I hope something like this will work.
&lt;br&gt;&lt;br&gt;select sum(salary) over 
&lt;br&gt;(partition by months order by minutes rows between unbounded preceding and current row)
&lt;br&gt;from tblSalaryData
&lt;br&gt;&lt;br&gt;I get an error by partition. &amp;nbsp;I know this doesn't give me the moving average, I'm just trying to get the &amp;quot;over&amp;quot; statement part to register.
&lt;br&gt;&lt;br&gt;Any ideas?
&lt;br&gt;&lt;br&gt;Thanks!</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Moving-Average--tp26559410p26559410.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26559296</id>
	<title>Re: SQLite data types.</title>
	<published>2009-11-28T20:31:51Z</published>
	<updated>2009-11-28T20:31:51Z</updated>
	<author>
		<name>P Kishor-3</name>
	</author>
	<content type="html">On Sat, Nov 28, 2009 at 10:24 PM, Ted Rolle, Jr. &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26559296&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;stercor@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; I'm laboring under a false impression.  I thought that the SQLite data
&lt;br&gt;&amp;gt; types were limited to text, integer, float, and something else.
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;you are under a correct impression. SQLite supports INTEGER, TEXT,
&lt;br&gt;REAL, and BLOB. It doesn't support &amp;quot;something else&amp;quot; but it accepts
&lt;br&gt;everything else.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; On the SQLite site there's Currency, date-time with and without
&lt;br&gt;&amp;gt; timestamps.
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;Those are not types. Internally they are stored as TEXT, but built in
&lt;br&gt;functions allow you to manipulate the data conveniently. See datetime
&lt;br&gt;functions.
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Where can I find a listing of these?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Ted
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ________________________________________________________________
&lt;br&gt;&amp;gt; 3.14159265358979323846264338327950  Let the spirit of pi spread
&lt;br&gt;&amp;gt; 2884197169399375105820974944592307  all around the world!
&lt;br&gt;&amp;gt; 8164062862089986280348253421170679  &lt;a href=&quot;http://pi314.at&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pi314.at&lt;/a&gt;&amp;nbsp;PI VOBISCUM!
&lt;br&gt;&amp;gt; ================================================================
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; sqlite-users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26559296&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Puneet Kishor &lt;a href=&quot;http://www.punkish.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.punkish.org&lt;/a&gt;&lt;br&gt;Carbon Model &lt;a href=&quot;http://carbonmodel.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://carbonmodel.org&lt;/a&gt;&lt;br&gt;Charter Member, Open Source Geospatial Foundation &lt;a href=&quot;http://www.osgeo.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.osgeo.org&lt;/a&gt;&lt;br&gt;Science Commons Fellow, &lt;a href=&quot;http://sciencecommons.org/about/whoweare/kishor&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sciencecommons.org/about/whoweare/kishor&lt;/a&gt;&lt;br&gt;Nelson Institute, UW-Madison &lt;a href=&quot;http://www.nelson.wisc.edu&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.nelson.wisc.edu&lt;/a&gt;&lt;br&gt;-----------------------------------------------------------------------
&lt;br&gt;Assertions are politics; backing up assertions with evidence is science
&lt;br&gt;=======================================================================
&lt;br&gt;Sent from Madison, WI, United States
&lt;br&gt;_______________________________________________
&lt;br&gt;sqlite-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26559296&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/SQLite-data-types.-tp26559270p26559296.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26559270</id>
	<title>SQLite data types.</title>
	<published>2009-11-28T20:24:44Z</published>
	<updated>2009-11-28T20:24:44Z</updated>
	<author>
		<name>stercor</name>
	</author>
	<content type="html">I'm laboring under a false impression. &amp;nbsp;I thought that the SQLite data
&lt;br&gt;types were limited to text, integer, float, and something else.
&lt;br&gt;&lt;br&gt;On the SQLite site there's Currency, date-time with and without
&lt;br&gt;timestamps.
&lt;br&gt;&lt;br&gt;Where can I find a listing of these?
&lt;br&gt;&lt;br&gt;Ted
&lt;br&gt;&lt;br&gt;________________________________________________________________
&lt;br&gt;3.14159265358979323846264338327950 &amp;nbsp;Let the spirit of pi spread
&lt;br&gt;2884197169399375105820974944592307 &amp;nbsp;all around the world!
&lt;br&gt;8164062862089986280348253421170679 &amp;nbsp;&lt;a href=&quot;http://pi314.at&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pi314.at&lt;/a&gt;&amp;nbsp;PI VOBISCUM!
&lt;br&gt;================================================================
&lt;br&gt;_______________________________________________
&lt;br&gt;sqlite-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26559270&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/SQLite-data-types.-tp26559270p26559270.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26558537</id>
	<title>Re: SQLite database for google maps</title>
	<published>2009-11-28T17:25:51Z</published>
	<updated>2009-11-28T17:25:51Z</updated>
	<author>
		<name>Jeremy Hinegardner</name>
	</author>
	<content type="html">On Sat, Nov 28, 2009 at 08:42:54AM -0600, P Kishor wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Sat, Nov 28, 2009 at 12:14 AM, logan &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26558537&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;logan04x@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt; Hi All,
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I'm trying to find if someone has got a database of Google maps for a
&lt;br&gt;&amp;gt; &amp;gt; particular town in an SQLite file. I'm looking to write an application
&lt;br&gt;&amp;gt; &amp;gt; which will query this database and find text directions.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I think you need to learn more about Google Maps to realize that your
&lt;br&gt;&amp;gt; question doesn't make any sense. There is no such thing as a &amp;quot;database
&lt;br&gt;&amp;gt; of Google Maps... in a SQLite file.&amp;quot; Even if one could somehow capture
&lt;br&gt;&amp;gt; Google Maps and put them in a sqlite file, it would be illegal to do
&lt;br&gt;&amp;gt; so, as it would violate Gmaps terms of service.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On the other hand, you can take geographic data stored in a sqlite db,
&lt;br&gt;&amp;gt; and display it on Google Maps. But, that is a completely different
&lt;br&gt;&amp;gt; question.
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;You may want to look at &lt;a href=&quot;http://www.openstreetmap.org/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.openstreetmap.org/&lt;/a&gt;&amp;nbsp;for free geographic
&lt;br&gt;data for Earth.
&lt;br&gt;&lt;br&gt;Also see their wiki &lt;a href=&quot;http://wiki.openstreetmap.org/wiki/Main_Page&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://wiki.openstreetmap.org/wiki/Main_Page&lt;/a&gt;&lt;br&gt;&lt;br&gt;enjoy,
&lt;br&gt;&lt;br&gt;-jeremy
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;========================================================================
&lt;br&gt;&amp;nbsp;Jeremy Hinegardner &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26558537&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jeremy@...&lt;/a&gt; 
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;sqlite-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26558537&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/SQLite-database-for-google-maps-tp26552745p26558537.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26556284</id>
	<title>Re: [solved] SQLite won't import 53, 066, 244 row 11 gigabyte CSV file</title>
	<published>2009-11-28T11:36:44Z</published>
	<updated>2009-11-28T11:36:44Z</updated>
	<author>
		<name>Roger Binns</name>
	</author>
	<content type="html">-----BEGIN PGP SIGNED MESSAGE-----
&lt;br&gt;Hash: SHA1
&lt;br&gt;&lt;br&gt;Simon Slavin wrote:
&lt;br&gt;&amp;gt; On 28 Nov 2009, at 3:55pm, Walter Dnes wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; ...and import worked. &amp;nbsp;So it appears that the maximum csv file is probably
&lt;br&gt;&amp;gt;&amp;gt; around 2 gigabytes.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; That does make sense of some kind, but it indicates that someone is using signed integers for file sizes. &amp;nbsp;Signed would be about 2 gigabytes, unsigned would give you about 4.
&lt;br&gt;&lt;br&gt;The file size type is off_t which turns out to be signed on most systems.
&lt;br&gt;Hence 2GB limit makes perfect sense.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://www.sqlite.org/src/info/92af7da36b&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sqlite.org/src/info/92af7da36b&lt;/a&gt;&lt;br&gt;&lt;br&gt;Roger
&lt;br&gt;-----BEGIN PGP SIGNATURE-----
&lt;br&gt;Version: GnuPG v1.4.9 (GNU/Linux)
&lt;br&gt;Comment: Using GnuPG with Mozilla - &lt;a href=&quot;http://enigmail.mozdev.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://enigmail.mozdev.org&lt;/a&gt;&lt;br&gt;&lt;br&gt;iEYEARECAAYFAksRe8kACgkQmOOfHg372QT85gCfZzXw4ko1asuwFVbPykKLlzqj
&lt;br&gt;5aYAnjreUB0bTZp9xROSIRs9VFcoWGd8
&lt;br&gt;=NjW5
&lt;br&gt;-----END PGP SIGNATURE-----
&lt;br&gt;_______________________________________________
&lt;br&gt;sqlite-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26556284&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/SQLite-won%27t-import-53%2C066%2C244-row-11-gigabyte-CSV-file-tp26549762p26556284.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26555686</id>
	<title>Re: [solved] SQLite won't import 53, 066, 244 row 11 gigabyte CSV file</title>
	<published>2009-11-28T10:31:56Z</published>
	<updated>2009-11-28T10:31:56Z</updated>
	<author>
		<name>Simon Slavin-3</name>
	</author>
	<content type="html">&lt;br&gt;On 28 Nov 2009, at 3:55pm, Walter Dnes wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; ...and import worked. &amp;nbsp;So it appears that the maximum csv file is probably
&lt;br&gt;&amp;gt; around 2 gigabytes.
&lt;br&gt;&lt;br&gt;That does make sense of some kind, but it indicates that someone is using signed integers for file sizes. &amp;nbsp;Signed would be about 2 gigabytes, unsigned would give you about 4.
&lt;br&gt;&lt;br&gt;Simon.
&lt;br&gt;_______________________________________________
&lt;br&gt;sqlite-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26555686&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/SQLite-won%27t-import-53%2C066%2C244-row-11-gigabyte-CSV-file-tp26549762p26555686.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26554307</id>
	<title>[solved] SQLite won't import 53, 066, 244 row 11 gigabyte CSV file</title>
	<published>2009-11-28T07:55:06Z</published>
	<updated>2009-11-28T07:55:06Z</updated>
	<author>
		<name>Walter Dnes</name>
	</author>
	<content type="html">&amp;nbsp; Thanks for the help. &amp;nbsp;I eventually got it working. And I'm working on
&lt;br&gt;the next stage of my project.
&lt;br&gt;&lt;br&gt;On Fri, Nov 27, 2009 at 06:31:03PM -0800, Roger Binns wrote
&lt;br&gt;&lt;br&gt;&amp;gt; Alternatively use split to make the input a series of files each
&lt;br&gt;&amp;gt; less than 4GB in size. &amp;nbsp;Or use a 64 bit host.
&lt;br&gt;&amp;nbsp; [...] 
&lt;br&gt;&amp;gt; If using a file smaller than 4GB fixes the issue for you then please
&lt;br&gt;&amp;gt; let me know and I'll add a ticket about large file support too.
&lt;br&gt;&lt;br&gt;&amp;nbsp; First, I tried...
&lt;br&gt;&lt;br&gt;[d531][waltdnes][~/SQLite] split -l 18000000 dly04.csv
&lt;br&gt;[d531][waltdnes][~/SQLite] ll xa*
&lt;br&gt;-rw-r--r-- 1 waltdnes users 3780000000 Nov 27 19:49 xaa
&lt;br&gt;-rw-r--r-- 1 waltdnes users 3780000000 Nov 27 19:52 xab
&lt;br&gt;-rw-r--r-- 1 waltdnes users 3583911240 Nov 27 19:54 xac
&lt;br&gt;&lt;br&gt;...and import failed with the same error. &amp;nbsp;Then I tried...
&lt;br&gt;&lt;br&gt;[d531][waltdnes][~/SQLite] split -l 9000000 dly04.csv
&lt;br&gt;[d531][waltdnes][~/SQLite] ll xa*
&lt;br&gt;-rw-r--r-- 1 waltdnes users 1890000000 Nov 27 20:06 xaa
&lt;br&gt;-rw-r--r-- 1 waltdnes users 1890000000 Nov 27 20:07 xab
&lt;br&gt;-rw-r--r-- 1 waltdnes users 1890000000 Nov 27 20:09 xac
&lt;br&gt;-rw-r--r-- 1 waltdnes users 1890000000 Nov 27 20:10 xad
&lt;br&gt;-rw-r--r-- 1 waltdnes users 1890000000 Nov 27 20:12 xae
&lt;br&gt;-rw-r--r-- 1 waltdnes users 1693911240 Nov 27 20:13 xaf
&lt;br&gt;&lt;br&gt;...and import worked. &amp;nbsp;So it appears that the maximum csv file is probably
&lt;br&gt;around 2 gigabytes.
&lt;br&gt;&lt;br&gt;&amp;gt; You can recompile the shell setting the flags (-D or #define):
&lt;br&gt;&amp;gt; _LARGE_FILE, _FILE_OFFSET_BITS=64 and _LARGEFILE_SOURCE
&lt;br&gt;&lt;br&gt;&amp;nbsp; I'm not a C programmer. &amp;nbsp;And I'd have to repeat the changes each time
&lt;br&gt;there's an update in the Gentoo linux ebuild. &amp;nbsp;Even something minor like
&lt;br&gt;3.6.17 ==&amp;gt; 3.6.18. &amp;nbsp;I've got 2 choices...
&lt;br&gt;&lt;br&gt;1) Pass your comments on to the Gentoo bugzilla, asking the Gentoo
&lt;br&gt;SQLite ebuild maintainer to put in a patch with your suggested change.
&lt;br&gt;&lt;br&gt;2) If the patching is going to be done upstream (i.e. by the SQLite
&lt;br&gt;people themselves) soon, then don't do anything. &amp;nbsp;The Gentoo version
&lt;br&gt;will automatically inherit the large file support with the new version.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Walter Dnes &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26554307&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;waltdnes@...&lt;/a&gt;&amp;gt;
&lt;br&gt;_______________________________________________
&lt;br&gt;sqlite-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26554307&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/SQLite-won%27t-import-53%2C066%2C244-row-11-gigabyte-CSV-file-tp26549762p26554307.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26553713</id>
	<title>Re: SQLite database for google maps</title>
	<published>2009-11-28T06:42:54Z</published>
	<updated>2009-11-28T06:42:54Z</updated>
	<author>
		<name>P Kishor-3</name>
	</author>
	<content type="html">On Sat, Nov 28, 2009 at 12:14 AM, logan &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26553713&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;logan04x@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; Hi All,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I'm trying to find if someone has got a database of Google maps for a
&lt;br&gt;&amp;gt; particular town in an SQLite file. I'm looking to write an application
&lt;br&gt;&amp;gt; which will query this database and find text directions.
&lt;br&gt;&lt;br&gt;I think you need to learn more about Google Maps to realize that your
&lt;br&gt;question doesn't make any sense. There is no such thing as a &amp;quot;database
&lt;br&gt;of Google Maps... in a SQLite file.&amp;quot; Even if one could somehow capture
&lt;br&gt;Google Maps and put them in a sqlite file, it would be illegal to do
&lt;br&gt;so, as it would violate Gmaps terms of service.
&lt;br&gt;&lt;br&gt;On the other hand, you can take geographic data stored in a sqlite db,
&lt;br&gt;and display it on Google Maps. But, that is a completely different
&lt;br&gt;question.
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; This is more
&lt;br&gt;&amp;gt; of a fun project for me than anything else, so I welcome all
&lt;br&gt;&amp;gt; suggestions if doing so is possible or not. My target platform is
&lt;br&gt;&amp;gt; Symbian.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Cheers,
&lt;br&gt;&amp;gt; Hitesh
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; sqlite-users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26553713&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Puneet Kishor &lt;a href=&quot;http://www.punkish.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.punkish.org&lt;/a&gt;&lt;br&gt;Carbon Model &lt;a href=&quot;http://carbonmodel.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://carbonmodel.org&lt;/a&gt;&lt;br&gt;Charter Member, Open Source Geospatial Foundation &lt;a href=&quot;http://www.osgeo.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.osgeo.org&lt;/a&gt;&lt;br&gt;Science Commons Fellow, &lt;a href=&quot;http://sciencecommons.org/about/whoweare/kishor&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sciencecommons.org/about/whoweare/kishor&lt;/a&gt;&lt;br&gt;Nelson Institute, UW-Madison &lt;a href=&quot;http://www.nelson.wisc.edu&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.nelson.wisc.edu&lt;/a&gt;&lt;br&gt;-----------------------------------------------------------------------
&lt;br&gt;Assertions are politics; backing up assertions with evidence is science
&lt;br&gt;=======================================================================
&lt;br&gt;Sent from Madison, Wisconsin, United States
&lt;br&gt;_______________________________________________
&lt;br&gt;sqlite-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26553713&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/SQLite-database-for-google-maps-tp26552745p26553713.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26552745</id>
	<title>SQLite database for google maps</title>
	<published>2009-11-27T22:14:34Z</published>
	<updated>2009-11-27T22:14:34Z</updated>
	<author>
		<name>logan-20</name>
	</author>
	<content type="html">Hi All,
&lt;br&gt;&lt;br&gt;I'm trying to find if someone has got a database of Google maps for a
&lt;br&gt;particular town in an SQLite file. I'm looking to write an application
&lt;br&gt;which will query this database and find text directions. This is more
&lt;br&gt;of a fun project for me than anything else, so I welcome all
&lt;br&gt;suggestions if doing so is possible or not. My target platform is
&lt;br&gt;Symbian.
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;Hitesh
&lt;br&gt;_______________________________________________
&lt;br&gt;sqlite-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26552745&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/SQLite-database-for-google-maps-tp26552745p26552745.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26549970</id>
	<title>Re: SQLite won't import 53, 066, 244 row 11 gigabyte CSV file</title>
	<published>2009-11-27T18:31:03Z</published>
	<updated>2009-11-27T18:31:03Z</updated>
	<author>
		<name>Roger Binns</name>
	</author>
	<content type="html">-----BEGIN PGP SIGNED MESSAGE-----
&lt;br&gt;Hash: SHA1
&lt;br&gt;&lt;br&gt;Walter Dnes wrote:
&lt;br&gt;&amp;gt; &amp;nbsp; Am I making some glaring noob error here?
&lt;br&gt;&lt;br&gt;The most likely cause is that the SQLite shell was compiled without support
&lt;br&gt;for large files. &amp;nbsp;(The SQLite library itself has large files on by default
&lt;br&gt;but the shell is separately compiled code.)
&lt;br&gt;&lt;br&gt;The shell uses the fopen standard library function to open the CSV file.
&lt;br&gt;You can find out what the error is by looking for a &amp;quot;cannot open file&amp;quot; error
&lt;br&gt;print in shell.c and adding 'perror(NULL);' as the previous line.
&lt;br&gt;&lt;br&gt;You can recompile the shell setting the flags (-D or #define): _LARGE_FILE,
&lt;br&gt;_FILE_OFFSET_BITS=64 and _LARGEFILE_SOURCE
&lt;br&gt;&lt;br&gt;Alternatively use split to make the input a series of files each less than
&lt;br&gt;4GB in size. &amp;nbsp;Or use a 64 bit host.
&lt;br&gt;&lt;br&gt;I've added a ticket to the tracker about the error reporting:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://www.sqlite.org/src/info/3671265894&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sqlite.org/src/info/3671265894&lt;/a&gt;&lt;br&gt;&lt;br&gt;If using a file smaller than 4GB fixes the issue for you then please let me
&lt;br&gt;know and I'll add a ticket about large file support too.
&lt;br&gt;&lt;br&gt;Roger
&lt;br&gt;-----BEGIN PGP SIGNATURE-----
&lt;br&gt;Version: GnuPG v1.4.9 (GNU/Linux)
&lt;br&gt;Comment: Using GnuPG with Mozilla - &lt;a href=&quot;http://enigmail.mozdev.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://enigmail.mozdev.org&lt;/a&gt;&lt;br&gt;&lt;br&gt;iEYEARECAAYFAksQi2IACgkQmOOfHg372QTlvQCgvpLhykiAcbZFWxnY5+TSYG4A
&lt;br&gt;FuQAoImQ2UPQhoCz5yrn6BLxOPeHkuKc
&lt;br&gt;=8JXy
&lt;br&gt;-----END PGP SIGNATURE-----
&lt;br&gt;_______________________________________________
&lt;br&gt;sqlite-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26549970&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/SQLite-won%27t-import-53%2C066%2C244-row-11-gigabyte-CSV-file-tp26549762p26549970.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26549762</id>
	<title>SQLite won't import 53,066,244 row 11 gigabyte CSV file</title>
	<published>2009-11-27T14:05:04Z</published>
	<updated>2009-11-27T14:05:04Z</updated>
	<author>
		<name>Walter Dnes</name>
	</author>
	<content type="html">&amp;nbsp; I'm running SQLite 3.6.18 on Gentoo linux. &amp;nbsp;The filesystem is
&lt;br&gt;Reiserfs, so 11 gigs should not be a problem. &amp;nbsp;Here's a screen scrape...
&lt;br&gt;&lt;br&gt;===============================================
&lt;br&gt;[d531][waltdnes][~/SQLite] ll dly04.csv
&lt;br&gt;-rw-r--r-- 1 waltdnes users 11143911240 Nov 27 15:34 dly04.csv
&lt;br&gt;&lt;br&gt;[d531][waltdnes][~/SQLite] sqlite3 dlyxx.sqlite
&lt;br&gt;SQLite version 3.6.18
&lt;br&gt;Enter &amp;quot;.help&amp;quot; for instructions
&lt;br&gt;Enter SQL statements terminated with a &amp;quot;;&amp;quot;
&lt;br&gt;sqlite&amp;gt; .mode csv dly04
&lt;br&gt;sqlite&amp;gt; .import dly04.csv dly04
&lt;br&gt;cannot open file: dly04.csv
&lt;br&gt;sqlite&amp;gt;
&lt;br&gt;===============================================
&lt;br&gt;&lt;br&gt;&amp;nbsp; Am I making some glaring noob error here? &amp;nbsp;I've successfully imported,
&lt;br&gt;and tested out smaller files using the same method. &amp;nbsp;The table dly04 has
&lt;br&gt;already been created, and it's just a matter of importing from the CSV
&lt;br&gt;file. &amp;nbsp;Is there a known maximum line-count or file-size? &amp;nbsp;If necessary,
&lt;br&gt;I can run &amp;quot;split -l &amp;lt;number_of_lines&amp;gt; dly04.csv&amp;quot;, and import the separate
&lt;br&gt;(smaller) pieces.
&lt;br&gt;&lt;br&gt;&amp;nbsp; Am I correct in assuming that multiple &amp;quot;.import&amp;quot; statements will
&lt;br&gt;append to an existing table, rather than overwriting? (Yes, I am new to
&lt;br&gt;SQLite).
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Walter Dnes &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26549762&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;waltdnes@...&lt;/a&gt;&amp;gt;
&lt;br&gt;_______________________________________________
&lt;br&gt;sqlite-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26549762&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/SQLite-won%27t-import-53%2C066%2C244-row-11-gigabyte-CSV-file-tp26549762p26549762.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26547406</id>
	<title>Re: Location of Sqlite Files</title>
	<published>2009-11-27T12:27:06Z</published>
	<updated>2009-11-27T12:27:06Z</updated>
	<author>
		<name>Simon Slavin-3</name>
	</author>
	<content type="html">&lt;br&gt;On 27 Nov 2009, at 7:54pm, mr_orange wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; Hey, I am kind of new to SQLite. I was wondering if anyone could help me with
&lt;br&gt;&amp;gt; a couple things:
&lt;br&gt;&amp;gt; 1) Where are the SQLite databases stored? I was told in the C:\WINDOWS\temp
&lt;br&gt;&amp;gt; folder, but I can't seem to find any SQLite-related files there.
&lt;br&gt;&amp;gt; 2) How do you delete a SQLite database?
&lt;br&gt;&lt;br&gt;Mr. Orange is obviously used to SQL engines which manage many files in a designated folder, for example MySQL.
&lt;br&gt;&lt;br&gt;SQLite handles databases very simply. &amp;nbsp;The first SQLite call you issue will probably be one that opens a database file or creates a new one if the file doesn't already exist. &amp;nbsp;In this call you supply the full path and filename. &amp;nbsp;So you could tell SQLite to open the file &amp;quot;C:\MyFiles\databases\animals.db&amp;quot; and that's one file will hold all the data. &amp;nbsp;Once your application has closed the connection that file is just a file: move it from folder to folder, copy it to a Flash drive, or delete it as you wish.
&lt;br&gt;&lt;br&gt;One note: while your application has the database open you may see a journal file, in the same folder as the database file with almost the same name. &amp;nbsp;Once your application has closed the database file, the journal file will disappear. &amp;nbsp;If the application crashes, when you next open the databases file SQLite will notice the journal file and use what it finds to update the database file without any corruption.
&lt;br&gt;&lt;br&gt;Simon.
&lt;br&gt;_______________________________________________
&lt;br&gt;sqlite-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26547406&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Location-of-Sqlite-Files-tp26545375p26547406.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26547142</id>
	<title>Re: Location of Sqlite Files</title>
	<published>2009-11-27T11:59:32Z</published>
	<updated>2009-11-27T11:59:32Z</updated>
	<author>
		<name>Artur Reilin-2</name>
	</author>
	<content type="html">1) I store my sqlite files at directories where i use it. Where do you
&lt;br&gt;know to store sqlite files in the temp directory? I use sqlitefront - like
&lt;br&gt;phpmyadmin - and there are also my files stored for better editing.
&lt;br&gt;&lt;br&gt;2. Ehm .. right click &amp;gt; delete? Or you mean to delete a whole database?
&lt;br&gt;use php function unlink for this.
&lt;br&gt;&lt;br&gt;with best wishes
&lt;br&gt;&lt;br&gt;Artur
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hey, I am kind of new to SQLite. I was wondering if anyone could help me
&lt;br&gt;&amp;gt; with
&lt;br&gt;&amp;gt; a couple things:
&lt;br&gt;&amp;gt; 1) Where are the SQLite databases stored? I was told in the
&lt;br&gt;&amp;gt; C:\WINDOWS\temp
&lt;br&gt;&amp;gt; folder, but I can't seem to find any SQLite-related files there.
&lt;br&gt;&amp;gt; 2) How do you delete a SQLite database?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Any help is much appreciated, thank you.
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; View this message in context:
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/Location-of-Sqlite-Files-tp26545375p26545375.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Location-of-Sqlite-Files-tp26545375p26545375.html&lt;/a&gt;&lt;br&gt;&amp;gt; Sent from the SQLite mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; sqlite-users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26547142&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;Artur Reilin
&lt;br&gt;sqlite.yuedream.de
&lt;br&gt;_______________________________________________
&lt;br&gt;sqlite-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26547142&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Location-of-Sqlite-Files-tp26545375p26547142.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26547140</id>
	<title>Re: Location of Sqlite Files</title>
	<published>2009-11-27T11:59:20Z</published>
	<updated>2009-11-27T11:59:20Z</updated>
	<author>
		<name>Adam DeVita</name>
	</author>
	<content type="html">1) save the db wherever is appropriate for your application. (network drives
&lt;br&gt;are generally considered to be a bad idea)
&lt;br&gt;2) An sqllite db is a file. There are lots of ways to delete files
&lt;br&gt;&lt;br&gt;Adam
&lt;br&gt;&lt;br&gt;&lt;br&gt;On Fri, Nov 27, 2009 at 2:54 PM, mr_orange &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26547140&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;rlvlach@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hey, I am kind of new to SQLite. I was wondering if anyone could help me
&lt;br&gt;&amp;gt; with
&lt;br&gt;&amp;gt; a couple things:
&lt;br&gt;&amp;gt; 1) Where are the SQLite databases stored? I was told in the C:\WINDOWS\temp
&lt;br&gt;&amp;gt; folder, but I can't seem to find any SQLite-related files there.
&lt;br&gt;&amp;gt; 2) How do you delete a SQLite database?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Any help is much appreciated, thank you.
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; View this message in context:
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/Location-of-Sqlite-Files-tp26545375p26545375.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Location-of-Sqlite-Files-tp26545375p26545375.html&lt;/a&gt;&lt;br&gt;&amp;gt; Sent from the SQLite mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; sqlite-users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26547140&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;VerifEye Technologies Inc.
&lt;br&gt;905-948-0015x245
&lt;br&gt;7100 Warden Ave, Unit 3
&lt;br&gt;Markham ON, L3R 8B5
&lt;br&gt;Canada
&lt;br&gt;_______________________________________________
&lt;br&gt;sqlite-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26547140&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Location-of-Sqlite-Files-tp26545375p26547140.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26545375</id>
	<title>Location of Sqlite Files</title>
	<published>2009-11-27T11:54:56Z</published>
	<updated>2009-11-27T11:54:56Z</updated>
	<author>
		<name>mr_orange</name>
	</author>
	<content type="html">Hey, I am kind of new to SQLite. I was wondering if anyone could help me with a couple things:
&lt;br&gt;1) Where are the SQLite databases stored? I was told in the C:\WINDOWS\temp folder, but I can't seem to find any SQLite-related files there.
&lt;br&gt;2) How do you delete a SQLite database?
&lt;br&gt;&lt;br&gt;Any help is much appreciated, thank you.</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Location-of-Sqlite-Files-tp26545375p26545375.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26552742</id>
	<title>Fix aliasing violations</title>
	<published>2009-11-27T10:46:50Z</published>
	<updated>2009-11-27T10:46:50Z</updated>
	<author>
		<name>Andreas Schwab-2</name>
	</author>
	<content type="html">A cast can never fix an aliasing violation.
&lt;br&gt;&lt;br&gt;Andreas.
&lt;br&gt;&lt;br&gt;--- sqlite-3.6.16/src/vdbeaux.c.~1~	2009-06-26 20:17:20.000000000 +0200
&lt;br&gt;+++ sqlite-3.6.16/src/vdbeaux.c	2009-11-27 19:19:02.000000000 +0100
&lt;br&gt;@@ -1046,17 +1046,17 @@ void sqlite3VdbeIOTraceSql(Vdbe *p){
&lt;br&gt;&amp;nbsp;** request, then increment *pnByte by the amount of the request.
&lt;br&gt;&amp;nbsp;*/
&lt;br&gt;&amp;nbsp;static void allocSpace(
&lt;br&gt;- &amp;nbsp;char *pp, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* IN/OUT: Set *pp to point to allocated buffer */
&lt;br&gt;+ &amp;nbsp;void **pp, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* IN/OUT: Set *pp to point to allocated buffer */
&lt;br&gt;&amp;nbsp; &amp;nbsp;int nByte, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* Number of bytes to allocate */
&lt;br&gt;&amp;nbsp; &amp;nbsp;u8 **ppFrom, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* IN/OUT: Allocate from *ppFrom */
&lt;br&gt;&amp;nbsp; &amp;nbsp;u8 *pEnd, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* Pointer to 1 byte past the end of *ppFrom buffer */
&lt;br&gt;&amp;nbsp; &amp;nbsp;int *pnByte &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* If allocation cannot be made, increment *pnByte */
&lt;br&gt;&amp;nbsp;){
&lt;br&gt;&amp;nbsp; &amp;nbsp;assert( EIGHT_BYTE_ALIGNMENT(*ppFrom) );
&lt;br&gt;- &amp;nbsp;if( (*(void**)pp)==0 ){
&lt;br&gt;+ &amp;nbsp;if( (*pp)==0 ){
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;nByte = ROUND8(nByte);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if( (pEnd - *ppFrom)&amp;gt;=nByte ){
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;*(void**)pp = (void *)*ppFrom;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;*pp = (void *)*ppFrom;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;*ppFrom += nByte;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}else{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;*pnByte += nByte;
&lt;br&gt;@@ -1131,15 +1131,26 @@ void sqlite3VdbeMakeReady(
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if( zEnd&amp;lt;zCsr ) zEnd = zCsr;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;do {
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;void *pp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;memset(zCsr, 0, zEnd-zCsr);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;nByte = 0;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;allocSpace((char*)&amp;p-&amp;gt;aMem, nMem*sizeof(Mem), &amp;zCsr, zEnd, &amp;nByte);
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;allocSpace((char*)&amp;p-&amp;gt;aVar, nVar*sizeof(Mem), &amp;zCsr, zEnd, &amp;nByte);
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;allocSpace((char*)&amp;p-&amp;gt;apArg, nArg*sizeof(Mem*), &amp;zCsr, zEnd, &amp;nByte);
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;allocSpace((char*)&amp;p-&amp;gt;azVar, nVar*sizeof(char*), &amp;zCsr, zEnd, &amp;nByte);
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;allocSpace((char*)&amp;p-&amp;gt;apCsr, 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;pp = p-&amp;gt;aMem;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;allocSpace(&amp;pp, nMem*sizeof(Mem), &amp;zCsr, zEnd, &amp;nByte);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;p-&amp;gt;aMem = pp;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;pp = p-&amp;gt;aVar;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;allocSpace(&amp;pp, nVar*sizeof(Mem), &amp;zCsr, zEnd, &amp;nByte);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;p-&amp;gt;aVar = pp;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;pp = p-&amp;gt;apArg;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;allocSpace(&amp;pp, nArg*sizeof(Mem*), &amp;zCsr, zEnd, &amp;nByte);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;p-&amp;gt;apArg = pp;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;pp = p-&amp;gt;azVar;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;allocSpace(&amp;pp, nVar*sizeof(char*), &amp;zCsr, zEnd, &amp;nByte);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;p-&amp;gt;azVar = pp;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;pp = p-&amp;gt;apCsr;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;allocSpace(&amp;pp, 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; nCursor*sizeof(VdbeCursor*), &amp;zCsr, zEnd, &amp;nByte
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;p-&amp;gt;apCsr = pp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if( nByte ){
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;p-&amp;gt;pFree = sqlite3DbMallocRaw(db, nByte);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Andreas Schwab, &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26552742&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;schwab@...&lt;/a&gt;
&lt;br&gt;GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 &amp;nbsp;01D3 44D5 214B 8276 4ED5
&lt;br&gt;&amp;quot;And now for something completely different.&amp;quot;
&lt;br&gt;_______________________________________________
&lt;br&gt;sqlite-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26552742&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Fix-aliasing-violations-tp26552742p26552742.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26541758</id>
	<title>Re: sqlite-users Digest, Vol 23, Issue 26</title>
	<published>2009-11-27T04:23:47Z</published>
	<updated>2009-11-27T04:23:47Z</updated>
	<author>
		<name>Pavel Ivanov-2</name>
	</author>
	<content type="html">&amp;gt; reasons. &amp;nbsp;Can primary key values available because of deletes get re-
&lt;br&gt;&amp;gt; used at some point?
&lt;br&gt;&lt;br&gt;I guess you're talking about rowids not about general primary keys.
&lt;br&gt;For rowids reuse is possible only if rows with maximum values of
&lt;br&gt;rowids are deleted and only if your INTEGER PRIMARY KEY column doesn't
&lt;br&gt;declared as AUTOINCREMENT.
&lt;br&gt;&lt;br&gt;&amp;gt; Also, in a multi-user environment, is it possible
&lt;br&gt;&amp;gt; that another user could insert a record into the same table after my
&lt;br&gt;&amp;gt; insert but before my SELECT max statement, or would locking prevent
&lt;br&gt;&amp;gt; that possibility?
&lt;br&gt;&lt;br&gt;If you don't do select in the same transaction as insert then it is
&lt;br&gt;possible to catch other user's id. Locking works only inside
&lt;br&gt;transaction, it cannot work between transaction boundaries.
&lt;br&gt;&lt;br&gt;&amp;gt; The description of last_insert_rowid says it &amp;quot;returns the rowid of the
&lt;br&gt;&amp;gt; most recent successful INSERT into the database from the database
&lt;br&gt;&amp;gt; connection in the first argument&amp;quot;. and the only parameter is the
&lt;br&gt;&amp;gt; database connection. &amp;nbsp;In a multi-user environment, it sounds like this
&lt;br&gt;&amp;gt; could be the rowid from a different table or, once again, does locking
&lt;br&gt;&amp;gt; take care of that possibility?
&lt;br&gt;&lt;br&gt;&amp;quot;Multi-user environment&amp;quot; that shares the same connection between
&lt;br&gt;multiple users? Doesn't that sound weird? If you've written your
&lt;br&gt;application in that way and try to be sure that last rowid comes from
&lt;br&gt;the correct table then it's the matter of your application
&lt;br&gt;correctness.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Pavel
&lt;br&gt;&lt;br&gt;On Thu, Nov 26, 2009 at 1:09 PM, Peter Haworth &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26541758&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pete@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Nov 26, 2009, at 4:00 AM, &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26541758&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users-request@...&lt;/a&gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Message: 28
&lt;br&gt;&amp;gt;&amp;gt; Date: Thu, 26 Nov 2009 06:38:52 +0000
&lt;br&gt;&amp;gt;&amp;gt; From: Simon Slavin &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26541758&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;slavins@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Subject: Re: [sqlite] Getting the rowid after an insert
&lt;br&gt;&amp;gt;&amp;gt; To: General Discussion of SQLite Database &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26541758&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Message-ID: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26541758&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;643124A9-E4DF-4287-A1BD-357126996D37@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Content-Type: text/plain; charset=us-ascii
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On 26 Nov 2009, at 5:54am, Edward Diener wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I have a table with an integer primary key as the first type. My
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; understanding is that this is an alias for the rowid. When I insert a
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; row in this table using _sqlite3_prepare and then sqlite3_step I
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; need to
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; retrieve the rowid for the row I have just inserted. Is there an SQL
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; statement I can use, or a way, to do that ?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.sqlite.org/c3ref/last_insert_rowid.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sqlite.org/c3ref/last_insert_rowid.html&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Simon.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I have this question too.  I'm not programming in C so don;t have
&lt;br&gt;&amp;gt; access to the sqlite_last_insert_rowid so have been using a SELECT max
&lt;br&gt;&amp;gt; statement to get the maximum value of the primary key in the table I
&lt;br&gt;&amp;gt; just inserted a row into.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Never been entirely comfortable with that method for a couple of
&lt;br&gt;&amp;gt; reasons.  Can primary key values available because of deletes get re-
&lt;br&gt;&amp;gt; used at some point?  Also, in a multi-user environment, is it possible
&lt;br&gt;&amp;gt; that another user could insert a record into the same table after my
&lt;br&gt;&amp;gt; insert but before my SELECT max statement, or would locking prevent
&lt;br&gt;&amp;gt; that possibility?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The description of last_insert_rowid says it &amp;quot;returns the rowid of the
&lt;br&gt;&amp;gt; most recent successful INSERT into the database from the database
&lt;br&gt;&amp;gt; connection in the first argument&amp;quot;. and the only parameter is the
&lt;br&gt;&amp;gt; database connection.  In a multi-user environment, it sounds like this
&lt;br&gt;&amp;gt; could be the rowid from a different table or, once again, does locking
&lt;br&gt;&amp;gt; take care of that possibility?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Pete
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; sqlite-users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26541758&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;/div&gt;_______________________________________________
&lt;br&gt;sqlite-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26541758&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-sqlite-users-Digest%2C-Vol-23%2C-Issue-26-tp26533102p26541758.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26541688</id>
	<title>Re: Compiler invariancy</title>
	<published>2009-11-27T04:16:44Z</published>
	<updated>2009-11-27T04:16:44Z</updated>
	<author>
		<name>Dan Kennedy-4</name>
	</author>
	<content type="html">&lt;br&gt;On Nov 27, 2009, at 6:52 AM, Christo Christoff wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hi
&lt;br&gt;&amp;gt; I report a prblem when compiling the recent fossil-based sqlite &amp;nbsp;
&lt;br&gt;&amp;gt; sources with BorlandC.
&lt;br&gt;&amp;gt; '
&lt;br&gt;&amp;gt; sqlite3.c:
&lt;br&gt;&amp;gt; Error E2140 sqlite3.c 99710: Declaration is not allowed here in &amp;nbsp;
&lt;br&gt;&amp;gt; function fts3TermSelect
&lt;br&gt;&amp;gt; *** 1 errors in Compile ***
&lt;br&gt;&amp;gt; '
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I Use the amalgamation of the 3.6.21
&lt;br&gt;&amp;gt; The Borland C compiler complains about the inline variable declaration
&lt;br&gt;&amp;gt; Fts3SegReader **pArray ...
&lt;br&gt;&amp;gt; in the finction `static int fts3TermSelect`
&lt;br&gt;&amp;gt; In order to achieve a compiler-invariancy I Suggest moving the &amp;nbsp;
&lt;br&gt;&amp;gt; problematic declaration
&lt;br&gt;&amp;gt; upwards.
&lt;/div&gt;&lt;br&gt;Thanks. Fixed here:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://www.sqlite.org/src/vinfo/97d332416069d2fbce323740b276d0e7523eeee5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sqlite.org/src/vinfo/97d332416069d2fbce323740b276d0e7523eeee5&lt;/a&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Best regards: Chris
&lt;br&gt;&amp;gt; 		 	 &amp;nbsp; 		
&lt;br&gt;&amp;gt; _________________________________________________________________
&lt;br&gt;&amp;gt; Windows Live: Friends get your Flickr, Yelp, and Digg updates when &amp;nbsp;
&lt;br&gt;&amp;gt; they e-mail you.
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_3:092010&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_3:092010&lt;/a&gt;&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; sqlite-users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26541688&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;/div&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;sqlite-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26541688&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Compiler-invariancy-tp26541641p26541688.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26540075</id>
	<title>Re: open transaction</title>
	<published>2009-11-27T01:52:02Z</published>
	<updated>2009-11-27T01:52:02Z</updated>
	<author>
		<name>SimonDavies</name>
	</author>
	<content type="html">2009/11/27 &amp;nbsp;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26540075&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;galeazzi@...&lt;/a&gt;&amp;gt;:
&lt;br&gt;&amp;gt; How could I know if a transaction is already open? Does a specific
&lt;br&gt;&amp;gt; command exist?
&lt;br&gt;&amp;gt; Cheers
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.sqlite.org/c3ref/get_autocommit.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sqlite.org/c3ref/get_autocommit.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;Rgds,
&lt;br&gt;Simon
&lt;br&gt;_______________________________________________
&lt;br&gt;sqlite-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26540075&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/open-transaction-tp26540046p26540075.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26540046</id>
	<title>open transaction</title>
	<published>2009-11-27T01:48:40Z</published>
	<updated>2009-11-27T01:48:40Z</updated>
	<author>
		<name>galeazzi</name>
	</author>
	<content type="html">How could I know if a transaction is already open? Does a specific &amp;nbsp;
&lt;br&gt;command exist?
&lt;br&gt;Cheers
&lt;br&gt;_______________________________________________
&lt;br&gt;sqlite-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26540046&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/open-transaction-tp26540046p26540046.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26538278</id>
	<title>Re: Index on joined statements</title>
	<published>2009-11-26T22:14:52Z</published>
	<updated>2009-11-26T22:14:52Z</updated>
	<author>
		<name>Jonas Sandman</name>
	</author>
	<content type="html">Okay, thanks! I think I understand better now, how to proceed.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Jonas
&lt;br&gt;&lt;br&gt;On Fri, Nov 27, 2009 at 3:19 AM, Igor Tandetnik &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538278&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;itandetnik@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Jonas Sandman wrote:
&lt;br&gt;&amp;gt;&amp;gt; Yes, but considering that I first join on typeid and then have name
&lt;br&gt;&amp;gt;&amp;gt; and subspecies in the where, wouldn't that index be optimal for that
&lt;br&gt;&amp;gt;&amp;gt; query?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Again, the order of conditionals in the query is largely irrelevant. Remember, your statement is equivalent to this one:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; select * from animals a, animaltype at
&lt;br&gt;&amp;gt; where a.name='Monkey' and a.subspecies=2 and at.id=a.typeid;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; In this form, it should be obvious that conditions can be evaluated in any order.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If I had to guess without knowing the composition of your data, I'd say that the most efficient plan would involve finding all records in animals with a.name='Monkey' and a.subspecies=2, and for each such record, find matching records in animaltype. I'm assuming that animals table contains records about many different animals, and the number of records about monkeys is small compared to the total number of records; in other words, that the condition &amp;quot;a.name='Monkey' and a.subspecies=2&amp;quot; is highly selective.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; For this query plan, you would want indexes on animals(name, subspecies) and animaltype(id).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Igor Tandetnik
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; sqlite-users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538278&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;/div&gt;_______________________________________________
&lt;br&gt;sqlite-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538278&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Index-on-joined-statements-tp26527741p26538278.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26537668</id>
	<title>Re: Sqlite Java blob</title>
	<published>2009-11-26T19:50:58Z</published>
	<updated>2009-11-26T19:50:58Z</updated>
	<author>
		<name>Ulric Auger</name>
	</author>
	<content type="html">I really think your simply missing a
&lt;br&gt;ps.close();
&lt;br&gt;&lt;br&gt;before your
&lt;br&gt;&lt;br&gt;connection.commit()
&lt;br&gt;&lt;br&gt;&lt;br&gt;Ulric
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;sqlite-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26537668&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Sqlite-Java-blob-tp26490107p26537668.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26537640</id>
	<title>Re: Sqlite Java blob</title>
	<published>2009-11-26T19:44:52Z</published>
	<updated>2009-11-26T19:44:52Z</updated>
	<author>
		<name>Peter Kelly-4</name>
	</author>
	<content type="html">Thanks for taking the time Ulric,
&lt;br&gt;I'm using sqlitejdbc-v054 from &lt;a href=&quot;http://files.zentus.com/sqlitejdbc/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://files.zentus.com/sqlitejdbc/&lt;/a&gt;, I
&lt;br&gt;notice they are up to v056, so I'll give that a go.
&lt;br&gt;&lt;br&gt;The stack trace
&lt;br&gt;&amp;lt;error&amp;gt;
&lt;br&gt;ERROR 53:13 [DB.prepareStatement() 697]: Error in sql: INSERT INTO
&lt;br&gt;delay_forms (t2_access_wp_action_required, t2_access_key,
&lt;br&gt;t2_access_vegetation, t2_access_streetlight_blocked, t2_access_other,
&lt;br&gt;t4_safety_wp_action_required, t4_safety_hv_line_too_close,
&lt;br&gt;t4_safety_network_unsafe, t4_safety_danger_tag_reference, t4_safety_other,
&lt;br&gt;t4_safety_additional_information, t7_cant_find_job_wp_action_required,
&lt;br&gt;t7_cant_find_job_site_visit_check, t7_cant_find_job_dfis_check,
&lt;br&gt;t7_cant_find_job_street_directory_check, t7_cant_find_job_dome_check,
&lt;br&gt;t7_cant_find_job_pole_check, t7_cant_find_job_streetlights_check,
&lt;br&gt;t7_cant_find_job_time_arrived_on_site, t7_cant_find_job_time_left_site,
&lt;br&gt;t8_underground_fault_supply_voltage_at_base,
&lt;br&gt;t8_underground_fault_description, t8_underground_fault_contractor_name,
&lt;br&gt;t8_underground_fault_contractor_phone, work_order, t1_traffic_management,
&lt;br&gt;t3_material, diagram_or_photograph)
&lt;br&gt;&amp;nbsp;VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
&lt;br&gt;?, ?, ?, ?, ?, ?)
&lt;br&gt;java.sql.SQLException: SQL logic error or missing database
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.sqlite.DB.throwex(DB.java:288)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.sqlite.DB.exec(DB.java:68)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at org.sqlite.Conn.commit(Conn.java:172)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at tabletapp.database.DB.prepareStatement(DB.java:695)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at tabletapp.database.DB.save(DB.java:778)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at tabletapp.FormPanel.saveData(FormPanel.java:627)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at tabletapp.FormView$3.actionPerformed(FormView.java:242)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Component.processMouseEvent(Component.java:6263)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Component.processEvent(Component.java:6028)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Container.processEvent(Container.java:2041)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Component.dispatchEventImpl(Component.java:4630)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Container.dispatchEventImpl(Container.java:2099)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Component.dispatchEvent(Component.java:4460)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Container.dispatchEventImpl(Container.java:2085)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Window.dispatchEventImpl(Window.java:2476)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Component.dispatchEvent(Component.java:4460)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Dialog$1.run(Dialog.java:1045)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Dialog$3.run(Dialog.java:1097)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.security.AccessController.doPrivileged(Native Method)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Dialog.show(Dialog.java:1095)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Component.show(Component.java:1563)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Component.setVisible(Component.java:1515)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Window.setVisible(Window.java:842)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Dialog.setVisible(Dialog.java:985)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;org.jdesktop.application.SingleFrameApplication.show(SingleFrameApplication.java:296)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at tabletapp.TabletApp.showEditForm(TabletApp.java:153)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at tabletapp.TableView.mainTableMouseClicked(TableView.java:517)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at tabletapp.TableView.access$700(TableView.java:39)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at tabletapp.TableView$6.mouseClicked(TableView.java:401)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:253)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Component.processMouseEvent(Component.java:6266)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Component.processEvent(Component.java:6028)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Container.processEvent(Container.java:2041)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Component.dispatchEventImpl(Component.java:4630)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Container.dispatchEventImpl(Container.java:2099)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Component.dispatchEvent(Component.java:4460)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;java.awt.LightweightDispatcher.processMouseEvent(Container.java:4247)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Container.dispatchEventImpl(Container.java:2085)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Window.dispatchEventImpl(Window.java:2476)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.Component.dispatchEvent(Component.java:4460)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at
&lt;br&gt;java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
&lt;br&gt;&lt;br&gt;&amp;lt;/error&amp;gt;
&lt;br&gt;&lt;br&gt;And heres th full code block
&lt;br&gt;&amp;lt;code&amp;gt;
&lt;br&gt;public void prepareStatement(String table, String sql,
&lt;br&gt;LinkedHashMap&amp;lt;String, String&amp;gt; data) {
&lt;br&gt;&amp;nbsp; try {
&lt;br&gt;&amp;nbsp; &amp;nbsp; String typeID = &amp;quot;&amp;quot;;
&lt;br&gt;&amp;nbsp; &amp;nbsp; PreparedStatement ps = connection.prepareStatement(sql);
&lt;br&gt;&amp;nbsp; &amp;nbsp; log.debug(&amp;quot;Preparing SQL: &amp;quot; + sql.replace(&amp;quot;\n&amp;quot;, &amp;quot;&amp;quot;));
&lt;br&gt;&amp;nbsp; &amp;nbsp; int parameterIndex = 1;
&lt;br&gt;&amp;nbsp; &amp;nbsp; //for (String columnName : getColumnNames(table)) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; for (String columnName : data.keySet()) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; typeID = getColumnType(table, columnName);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if (data.containsKey(columnName)) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String value = data.get(columnName);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (value == null || &amp;quot;&amp;quot;.equals(value)) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //log.debug(columnName+&amp;quot;:&amp;quot;+parameterIndex+&amp;quot; set to null&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ps.setNull(parameterIndex, Types.NULL);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //log.debug(columnName+&amp;quot;:&amp;quot;+parameterIndex+&amp;quot; set to &amp;quot;+value);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; switch (getColumnTypeId(table, columnName)) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case Types.VARCHAR:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case Types.CHAR:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log.debug(&amp;quot;Parameter &amp;quot; + parameterIndex + &amp;quot; = &amp;quot; + value);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ps.setString(parameterIndex, value);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case Types.TIMESTAMP:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DateFormat timestampFormat = new SimpleDateFormat(&amp;quot;yyyy-MM-dd
&lt;br&gt;HH:mm:ss&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Timestamp timestamp = new Timestamp(new
&lt;br&gt;java.util.Date().getTime());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; timestamp = new
&lt;br&gt;Timestamp(timestampFormat.parse(value).getTime());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (ParseException e) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log.error(&amp;quot;Unable to parse timestamp: &amp;quot; + value + &amp;quot;.&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log.debug(&amp;quot;Parameter &amp;quot; + parameterIndex + &amp;quot; = &amp;quot; + timestamp);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ps.setTimestamp(parameterIndex, timestamp);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case Types.DATE:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DateFormat dateFormat = new SimpleDateFormat(&amp;quot;yyyy-MM-dd&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; java.sql.Date date = new java.sql.Date(new
&lt;br&gt;java.util.Date().getTime());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; timestamp = new Timestamp(dateFormat.parse(value).getTime());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (ParseException e) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log.error(&amp;quot;Unable to parse date: &amp;quot; + value + &amp;quot;.&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log.debug(&amp;quot;Parameter &amp;quot; + parameterIndex + &amp;quot; = &amp;quot; + date);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ps.setDate(parameterIndex, date);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case Types.SMALLINT:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case Types.INTEGER:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case Types.NUMERIC:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log.debug(&amp;quot;Parameter &amp;quot; + parameterIndex + &amp;quot; = &amp;quot; + value);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ps.setInt(parameterIndex, new Integer(value));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case Types.FLOAT:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log.debug(&amp;quot;Parameter &amp;quot; + parameterIndex + &amp;quot; = &amp;quot; + value);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ps.setFloat(parameterIndex, new Float(value));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case Types.BLOB:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // convert to byte array to blob
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; byte[] bData;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ByteArrayInputStream bais ;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bData = tabletapp.util.Base64.toBytes(value);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log.info(&amp;quot;I have &amp;quot; + bData.length + &amp;quot; bytes in Bytes[]&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bais = new ByteArrayInputStream(bData);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //String mimeType =
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //log.info(&amp;quot;Mime types: &amp;quot;+mimeType);}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (Exception e) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bData = null;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log.info(&amp;quot;Something went Horribly, Horribly Wrong&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log.info(e.getLocalizedMessage());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bais = new ByteArrayInputStream(bData);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log.info(&amp;quot;Database is &amp;quot; + dbType);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (dbType.equals(&amp;quot;sqlite&amp;quot;)) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ps.setBytes(parameterIndex, bData);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (SQLException e) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log.debug(e.getLocalizedMessage());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log.info(&amp;quot;Sqlite Blob set to &amp;quot; + value);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ps.setBlob(parameterIndex, bais, bData.length);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log.debug(&amp;quot;Parameter &amp;quot; + parameterIndex + &amp;quot; = [BLOB]&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case Types.BOOLEAN:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case Types.BIT:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //log.debug(table + &amp;quot;.&amp;quot; + columnName + &amp;quot; (boolean) = &amp;quot; + value);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Boolean val = (&amp;quot;1&amp;quot;.equals(value) || &amp;quot;true&amp;quot;.equals(value));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log.debug(&amp;quot;Parameter &amp;quot; + parameterIndex + &amp;quot; = &amp;quot; + val);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ps.setBoolean(parameterIndex, val);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; default:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log.debug(&amp;quot;Parameter &amp;quot; + parameterIndex + &amp;quot; = &amp;quot; + value);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ps.setString(parameterIndex, value);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; parameterIndex++;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; ps.executeUpdate();
&lt;br&gt;&amp;nbsp; &amp;nbsp; connection.commit();
&lt;br&gt;&amp;nbsp; } catch (SQLException e) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; log.error(&amp;quot;Error in sql: &amp;quot; + sql);
&lt;br&gt;&amp;nbsp; &amp;nbsp; e.printStackTrace();
&lt;br&gt;&amp;nbsp; }
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;&amp;lt;/code&amp;gt;
&lt;br&gt;Ulric Auger wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Having the complete stack trace of the exception would help a lot.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Here are some thoughts:
&lt;br&gt;&amp;gt; 1- You did not explicitly close the preparedstatement before calling
&lt;br&gt;&amp;gt; commit.
&lt;br&gt;&amp;gt; 2- You are trying to commit without having started a transaction.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I don't think the problem is related to the setBytes() as I have similar
&lt;br&gt;&amp;gt; code in my application and it work perfectly.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Which version of SQLiteJDBC you are using?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Ulric
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Peter
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;sqlite-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26537640&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Sqlite-Java-blob-tp26490107p26537640.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26537541</id>
	<title>Re: Sqlite Java blob</title>
	<published>2009-11-26T19:27:14Z</published>
	<updated>2009-11-26T19:27:14Z</updated>
	<author>
		<name>Ulric Auger</name>
	</author>
	<content type="html">Having the complete stack trace of the exception would help a lot.
&lt;br&gt;&lt;br&gt;Here are some thoughts:
&lt;br&gt;1- You did not explicitly close the preparedstatement before calling commit.
&lt;br&gt;2- You are trying to commit without having started a transaction.
&lt;br&gt;&lt;br&gt;I don't think the problem is related to the setBytes() as I have similar
&lt;br&gt;code in my application and it work perfectly.
&lt;br&gt;&lt;br&gt;Which version of SQLiteJDBC you are using?
&lt;br&gt;&lt;br&gt;Ulric
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;sqlite-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26537541&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Sqlite-Java-blob-tp26490107p26537541.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26537435</id>
	<title>Re: Sqlite Java blob</title>
	<published>2009-11-26T19:05:11Z</published>
	<updated>2009-11-26T19:05:11Z</updated>
	<author>
		<name>Peter Kelly-4</name>
	</author>
	<content type="html">&lt;br&gt;Ulric Auger wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; What is failing at line: [DB.prepareStatement() 686]
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Connection.prepareStatement(&amp;quot;INSERT INTO delay_forms (...) VALUES (...)&amp;quot;);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; OR
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ps.executeUpdate()
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Your code (between &amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;) seem fine.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Ulric
&lt;/div&gt;&lt;br&gt;Hi ulric, the line that is failing
&lt;br&gt;&amp;lt;code&amp;gt;
&lt;br&gt;695 connection.commit();
&lt;br&gt;&amp;lt;/code&amp;gt;
&lt;br&gt;Thanks for help so far.
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26537435&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users-bounces@...&lt;/a&gt;
&lt;br&gt;&amp;gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26537435&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users-bounces@...&lt;/a&gt;] On Behalf Of Peter Kelly
&lt;br&gt;&amp;gt; Sent: November 24, 2009 12:51 AM
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26537435&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Subject: Re: [sqlite] Sqlite Java blob
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks, I've tried that, but to no avail.
&lt;br&gt;&amp;gt; Maybe a bit of background, our applaiction generates its froms from the
&lt;br&gt;&amp;gt; database layout, this is so it can be used for a variety tasks. It talks
&lt;br&gt;&amp;gt; to mysql and sqlite, so I was trying to keep the code as generic as
&lt;br&gt;&amp;gt; possibe.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I have a procedure - prepareStatement that takes the data to be saved as a
&lt;br&gt;&amp;gt; LinkedHasMap of strings &amp;lt;Columnanme,Value&amp;gt; and the table name, using this
&lt;br&gt;&amp;gt; and our database model we get the column types for the data, extract the
&lt;br&gt;&amp;gt; value and convert as required to the right type (mysql is a little bit
&lt;br&gt;&amp;gt; pickier than sqlite about types).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Heres the bit where I (try and) convert the value and insert it as binary
&lt;br&gt;&amp;gt; data. I have an image converted to a base64 string stored in the value,
&lt;br&gt;&amp;gt; this all happens inside a loop iterating through the columns for the data
&lt;br&gt;&amp;gt; to be stored.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Some of the methods I've tried
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; //SerialBlob blob = new SerialBlob(bData);
&lt;br&gt;&amp;gt; //ps.setBlob(parameterIndex,blob);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; //Blob blob=connection.createBlob();
&lt;br&gt;&amp;gt; //blob.setBytes(bData.length, bData);
&lt;br&gt;&amp;gt; // ps.setBlob(parameterIndex,blob);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; //ByteArrayInputStream bais = new ByteArrayInputStream(bData);
&lt;br&gt;&amp;gt; //ps.setBinaryStream(parameterIndex, bais);
&lt;br&gt;&amp;gt; //ps.setBinaryStream(parameterIndex, bais,bData.length);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;code&amp;gt;
&lt;br&gt;&amp;gt; case Types.BLOB:
&lt;br&gt;&amp;gt; // convert to byte array to blob
&lt;br&gt;&amp;gt; byte[] bData;
&lt;br&gt;&amp;gt; try {
&lt;br&gt;&amp;gt; 	bData = tabletapp.util.Base64.toBytes(value);
&lt;br&gt;&amp;gt; 	log.info(&amp;quot;I have &amp;quot;+bData.length+&amp;quot; bytes in Bytes[]&amp;quot;);
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt; catch (Exception e){
&lt;br&gt;&amp;gt; 	bData = null;
&lt;br&gt;&amp;gt; 	log.info(&amp;quot;Something went Horribly, Horribly Wrong&amp;quot;);
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt; ByteArrayInputStream bais = new ByteArrayInputStream(bData);
&lt;br&gt;&amp;gt; log.info(&amp;quot;Database is &amp;quot;+dbType);
&lt;br&gt;&amp;gt; if (dbType.equals(&amp;quot;sqlite&amp;quot;)){
&lt;br&gt;&amp;gt; 	ps.setBytes(parameterIndex, bData);
&lt;br&gt;&amp;gt; 	log.info(&amp;quot;Sqlite Blob set to &amp;quot;+value);
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt; else { // mysql
&lt;br&gt;&amp;gt; 	ps.setBlob(parameterIndex, bais, bData.length);
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt; log.debug(&amp;quot;Parameter &amp;quot; + parameterIndex + &amp;quot; = [BLOB]&amp;quot;);
&lt;br&gt;&amp;gt; break;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;/code&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; And if your still reading ;), heres the error
&lt;br&gt;&amp;gt; &amp;lt;error&amp;gt;
&lt;br&gt;&amp;gt; java.sql.SQLException: SQL logic error or missing database
&lt;br&gt;&amp;gt; ERROR 37:45 [DB.prepareStatement() 686]: Error in sql: INSERT INTO
&lt;br&gt;&amp;gt; delay_forms (t2_access_wp_action_required, t2_access_key,
&lt;br&gt;&amp;gt; t2_access_vegetation, t2_access_streetlight_blocked, t2_access_other,
&lt;br&gt;&amp;gt; t4_safety_wp_action_required, t4_safety_hv_line_too_close,
&lt;br&gt;&amp;gt; t4_safety_network_unsafe, t4_safety_danger_tag_reference, t4_safety_other,
&lt;br&gt;&amp;gt; t4_safety_additional_information, t7_cant_find_job_wp_action_required,
&lt;br&gt;&amp;gt; t7_cant_find_job_site_visit_check, t7_cant_find_job_dfis_check,
&lt;br&gt;&amp;gt; t7_cant_find_job_street_directory_check, t7_cant_find_job_dome_check,
&lt;br&gt;&amp;gt; t7_cant_find_job_pole_check, t7_cant_find_job_streetlights_check,
&lt;br&gt;&amp;gt; t7_cant_find_job_time_arrived_on_site, t7_cant_find_job_time_left_site,
&lt;br&gt;&amp;gt; t8_underground_fault_supply_voltage_at_base,
&lt;br&gt;&amp;gt; t8_underground_fault_description, t8_underground_fault_contractor_name,
&lt;br&gt;&amp;gt; t8_underground_fault_contractor_phone, work_order, t1_traffic_management,
&lt;br&gt;&amp;gt; t3_material, diagram_or_photograph)
&lt;br&gt;&amp;gt; &amp;nbsp;VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
&lt;br&gt;&amp;gt; ?, ?, ?, ?, ?, ?)
&lt;br&gt;&amp;gt; &amp;lt;/error&amp;gt;
&lt;br&gt;&amp;gt; Which looks to me like the prepared statement is wrong somehow, I'm pretty
&lt;br&gt;&amp;gt; sure there is the same number of ? as fields and it works for other tables
&lt;br&gt;&amp;gt; that don't have blob data, so I'm fairly convinced the issue is in the
&lt;br&gt;&amp;gt; above, but I could be wrong.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Any ideas greatly appreciated :)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Ulric Auger wrote:
&lt;br&gt;&amp;gt;&amp;gt; Use PreparedStatement setBytes method.
&lt;br&gt;&amp;gt;&amp;gt; No need to convert to base64.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Ulric
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt;&amp;gt; From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26537435&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users-bounces@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26537435&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users-bounces@...&lt;/a&gt;] On Behalf Of Peter Kelly
&lt;br&gt;&amp;gt;&amp;gt; Sent: November 23, 2009 10:47 PM
&lt;br&gt;&amp;gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26537435&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; Subject: [sqlite] Sqlite Java blob
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Hi, I've been tearining my hair out trying to figure out how store my
&lt;br&gt;&amp;gt;&amp;gt; image data in sqlite using Java. I think the best way to go is just
&lt;br&gt;&amp;gt;&amp;gt; store
&lt;br&gt;&amp;gt;&amp;gt; the base64 encoded string in the column, but I can for the life of me
&lt;br&gt;&amp;gt;&amp;gt; get
&lt;br&gt;&amp;gt;&amp;gt; a prepared statement for that to work.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Can anybody show me how they are storing blobs in a sqlite databse?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Thnaks in advance :)
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; --
&lt;br&gt;&amp;gt;&amp;gt; Peter
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt;&amp;gt; sqlite-users mailing list
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26537435&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; Peter
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; sqlite-users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26537435&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; Peter
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; sqlite-users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26537435&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Peter
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;sqlite-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26537435&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Sqlite-Java-blob-tp26490107p26537435.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26537222</id>
	<title>Re: Index on joined statements</title>
	<published>2009-11-26T18:19:33Z</published>
	<updated>2009-11-26T18:19:33Z</updated>
	<author>
		<name>Igor Tandetnik</name>
	</author>
	<content type="html">Jonas Sandman wrote:
&lt;br&gt;&amp;gt; Yes, but considering that I first join on typeid and then have name
&lt;br&gt;&amp;gt; and subspecies in the where, wouldn't that index be optimal for that
&lt;br&gt;&amp;gt; query?
&lt;br&gt;&lt;br&gt;Again, the order of conditionals in the query is largely irrelevant. Remember, your statement is equivalent to this one:
&lt;br&gt;&lt;br&gt;select * from animals a, animaltype at
&lt;br&gt;where a.name='Monkey' and a.subspecies=2 and at.id=a.typeid;
&lt;br&gt;&lt;br&gt;In this form, it should be obvious that conditions can be evaluated in any order.
&lt;br&gt;&lt;br&gt;If I had to guess without knowing the composition of your data, I'd say that the most efficient plan would involve finding all records in animals with a.name='Monkey' and a.subspecies=2, and for each such record, find matching records in animaltype. I'm assuming that animals table contains records about many different animals, and the number of records about monkeys is small compared to the total number of records; in other words, that the condition &amp;quot;a.name='Monkey' and a.subspecies=2&amp;quot; is highly selective.
&lt;br&gt;&lt;br&gt;For this query plan, you would want indexes on animals(name, subspecies) and animaltype(id).
&lt;br&gt;&lt;br&gt;Igor Tandetnik
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;sqlite-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26537222&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Index-on-joined-statements-tp26527741p26537222.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26541641</id>
	<title>Compiler invariancy</title>
	<published>2009-11-26T15:52:28Z</published>
	<updated>2009-11-26T15:52:28Z</updated>
	<author>
		<name>Christo Christoff</name>
	</author>
	<content type="html">&lt;br&gt;Hi
&lt;br&gt;I report a prblem when compiling the recent fossil-based sqlite sources with BorlandC.
&lt;br&gt;'
&lt;br&gt;sqlite3.c:
&lt;br&gt;Error E2140 sqlite3.c 99710: Declaration is not allowed here in function fts3TermSelect
&lt;br&gt;*** 1 errors in Compile ***
&lt;br&gt;'
&lt;br&gt;&lt;br&gt;I Use the amalgamation of the 3.6.21
&lt;br&gt;The Borland C compiler complains about the inline variable declaration
&lt;br&gt;Fts3SegReader **pArray ...
&lt;br&gt;&amp;nbsp;in the finction `static int fts3TermSelect`
&lt;br&gt;In order to achieve a compiler-invariancy I Suggest moving the problematic declaration 
&lt;br&gt;upwards.
&lt;br&gt;Best regards: Chris
&lt;br&gt;&amp;nbsp;		 	 &amp;nbsp; 		 &amp;nbsp;
&lt;br&gt;_________________________________________________________________
&lt;br&gt;Windows Live: Friends get your Flickr, Yelp, and Digg updates when they e-mail you.
&lt;br&gt;&lt;a href=&quot;http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_3:092010&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_3:092010&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;sqlite-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26541641&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Compiler-invariancy-tp26541641p26541641.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26533273</id>
	<title>Re: sqlite-users Digest, Vol 23, Issue 26</title>
	<published>2009-11-26T10:23:56Z</published>
	<updated>2009-11-26T10:23:56Z</updated>
	<author>
		<name>Gerry Snyder-4</name>
	</author>
	<content type="html">Peter Haworth wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I have this question too. &amp;nbsp;I'm not programming in C so don;t have &amp;nbsp;
&lt;br&gt;&amp;gt; access to the sqlite_last_insert_rowid....
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;Yes you do. You just didn't realize it. Using the cmd line tool:
&lt;br&gt;&lt;br&gt;F:\sqlite&amp;gt;sqlite3
&lt;br&gt;SQLite version 3.5.9
&lt;br&gt;Enter &amp;quot;.help&amp;quot; for instructions
&lt;br&gt;sqlite&amp;gt; create table a(b);
&lt;br&gt;sqlite&amp;gt; insert into a values(17);
&lt;br&gt;sqlite&amp;gt; select last_insert_rowid();
&lt;br&gt;1
&lt;br&gt;sqlite&amp;gt; insert into a values(18);
&lt;br&gt;sqlite&amp;gt; insert into a values(19);
&lt;br&gt;sqlite&amp;gt; select last_insert_rowid();
&lt;br&gt;3
&lt;br&gt;sqlite&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;HTH, and happy turkey day!!
&lt;br&gt;&lt;br&gt;&lt;br&gt;Gerry
&lt;br&gt;_______________________________________________
&lt;br&gt;sqlite-users mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26533273&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sqlite-users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-sqlite-users-Digest%2C-Vol-23%2C-Issue-26-tp26533102p26533273.html" />
</entry>

</feed>
