Re: [sqlite] SQLite and Perl

2012-01-26 Thread Darren Duncan

Puneet Kishor wrote:

On Jan 26, 2012, at 2:53 PM, Bill McCormick wrote:


Puneet Kishor wrote, On 1/26/2012 12:02 PM:

$ cpanm DBD::SQLite

there is no step two


Actually, that's not correct. In my case it took the following:
Step 1: cpan DBI
Step 2: cpan DBD:SQLite

What is cpanm? A typo?



http://search.cpan.org/~miyagawa/App-cpanminus-1.5007/lib/App/cpanminus.pm

yes, I kinda assumed that you had DBI already... so, indeed, install DBI, then 
install DBD::SQLite. That is all.


DBI is a declared dependency of DBD::SQLite, so I'd expect the simple "cpan 
DBD::SQLite", or cpanm or cpanplus, to also install DBI if you don't have it. 
That's one of the reasons you use those CPAN clients, to effortlessly pull in 
dependencies too, essentially like package managers.


Also, cpan and cpanplus are bundled with Perl 5.10.1, but cpanm you have to 
install separately.


-- Darren Duncan
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Incompatible versions of SQLite on same system

2012-01-26 Thread Joe Mistachkin

Joe Winograd wrote:
> 
> I don't have access to the machine with HP Connection Manager on it, but I

> just ran Dependency Walker on the TurboTax 2010 executable on a W7/64-bit 
> machine, which is the same OS as on the other box, and DW showed no
entries 
> in the module list with  in the name of the module. Does this make

> sense? Thanks, Joe
> 

In order to see which managed assemblies a .NET-based application will
require,
you'll need to use the ILDASM tool from the .NET SDK:

http://msdn.microsoft.com/en-us/library/f7dy01k1%28v=vs.80%29.aspx

--
Joe Mistachkin

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite and Perl

2012-01-26 Thread Bill McCormick

Puneet Kishor wrote, On 1/26/2012 3:01 PM:

On Jan 26, 2012, at 2:53 PM, Bill McCormick wrote:


Puneet Kishor wrote, On 1/26/2012 12:02 PM:

On Jan 26, 2012, at 11:59 AM, Bill McCormick wrote:


I need to get going with Perl&   SQLite and I'm wondering what I need to get 
off CPAN, if anything.


$ cpanm DBD::SQLite

there is no step two


Actually, that's not correct. In my case it took the following:
Step 1: cpan DBI
Step 2: cpan DBD:SQLite

What is cpanm? A typo?


http://search.cpan.org/~miyagawa/App-cpanminus-1.5007/lib/App/cpanminus.pm



Just curious, how is cpanm module different than cpan module?
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite and Perl

2012-01-26 Thread Puneet Kishor

On Jan 26, 2012, at 2:53 PM, Bill McCormick wrote:

> Puneet Kishor wrote, On 1/26/2012 12:02 PM:
>> On Jan 26, 2012, at 11:59 AM, Bill McCormick wrote:
>> 
>>> I need to get going with Perl&  SQLite and I'm wondering what I need to get 
>>> off CPAN, if anything.
>> 
>> 
>> $ cpanm DBD::SQLite
>> 
>> there is no step two
>> 
> Actually, that's not correct. In my case it took the following:
> Step 1: cpan DBI
> Step 2: cpan DBD:SQLite
> 
> What is cpanm? A typo?
> 

http://search.cpan.org/~miyagawa/App-cpanminus-1.5007/lib/App/cpanminus.pm

yes, I kinda assumed that you had DBI already... so, indeed, install DBI, then 
install DBD::SQLite. That is all.

--
Puneet Kishor
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite and Perl

2012-01-26 Thread Bill McCormick

Puneet Kishor wrote, On 1/26/2012 12:02 PM:

On Jan 26, 2012, at 11:59 AM, Bill McCormick wrote:


I need to get going with Perl&  SQLite and I'm wondering what I need to get off 
CPAN, if anything.



$ cpanm DBD::SQLite

there is no step two


Actually, that's not correct. In my case it took the following:
Step 1: cpan DBI
Step 2: cpan DBD:SQLite

What is cpanm? A typo?


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] MyJSQLView Version 3.33 Released

2012-01-26 Thread danap
MyJSQLView Version 3.33 Released

The MyJSQLView project is pleased to release v3.33 to the public. The
release includes improvements in the efficiency of use for the SQL Query
Bucket and an Aggregation/GROUP BY feature for the Advanced Sort/Search
Form. The new release also brings a new default plugin called HeatMapper
that allows the plotting of multi-variable numeric data. Initial tests
for the HeatMapper plugin used latitude, longitude, and temperature
data from measurements in the Alantic with over 90k records.

MyJSQLView uses the Xerial SQLite JDBC to establish the connection to
a SQLite Database via it be file or memory.

Dana M. Proctor
MyJSQLView Project Manager
http://dandymadeproductions.com/projects/MyJSQLView/
http://www.xerial.org/trac/Xerial

MyJSQLView provides an easy to use Java based user interface frontend
for viewing, adding, editing, or deleting entries in serveral databases
including SQLite. A query frame allows the building of complex SQL
statements. The application allows easy sorting, searching, and import
/export of table data.

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Incompatible versions of SQLite on same system

2012-01-26 Thread Joe Winograd
I don't have access to the machine with HP Connection Manager on it, but I 
just ran Dependency Walker on the TurboTax 2010 executable on a W7/64-bit 
machine, which is the same OS as on the other box, and DW showed no entries 
in the module list with  in the name of the module. Does this make 
sense? Thanks, Joe



 Original Message 
Subject: Re: [sqlite] Incompatible versions of SQLite on same system
From: Black, Michael (IS) 
To: General Discussion of SQLite Database 
Date: Wed Jan 25 2012 07:25:52 GMT-0600 (Central Standard Time)
Try this utility on both programs and find out what DLL they are actually 
going for.  And remember that if the DLL is already loaded it will use that.


http://www.dependencywalker.com/

Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Information Systems


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQL query causes various hangs/crashes/exits

2012-01-26 Thread Larry Knibb
Thanks! Splitting the index into two did the trick and now the query
is working well.

Cheers,
Larry

On 25 January 2012 21:01, Igor Tandetnik  wrote:
> Larry Knibb  wrote:
>> SELECT DISTINCT d.rowid AS id, d.*, i.relevance
>> FROM dictionary d
>> JOIN hp_index i ON i.dictionary_id = d.rowid
>> JOIN hanzi h ON h.rowid = i.hanzi_id
>> WHERE h.traditional = '我' OR h.simplified = '我'
>> ORDER BY i.relevance desc
>>
>> I can get it to work by dropping the OR h.simplified part of the WHERE 
>> clause.
>>
>> However, if I use a single where clause but use the h.simplified
>> column instead then it breaks again. Maybe it's the index?
>>
>> CREATE INDEX i3 ON hanzi(traditional, simplified);
>
> This index can help satisfy conditions of the form (traditional='X') or  
> (traditional='X' AND simplified='Y'). But it doesn't help at all for 
> conditions on (simplified='Y') or (traditional='X' OR simplified='Y'). So 
> your query devolves to a full table scan, and apparently, that just takes a 
> long time.
>
> Think about it this way. Imagine you have a phonebook with people's names, 
> sorted by last name then first name. This makes it easy to find all Smiths, 
> or all John Smiths, but doesn't help with the task of finding all Johns, nor 
> all people who are either John or Smith.
>
> You want two separate indexes, one on hanzi(traditional) and another on 
> hanzi(simplified)
> --
> Igor Tandetnik
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite3 on Windows

2012-01-26 Thread Igor Tandetnik

On 1/26/2012 1:49 PM, Pete wrote:

I have been using sqlite on OS X for some time and sqlite3 comes
pre-installed.  I'm now looking at running some apps on Windows 7 and I
don't think sqlite3 is pre-installed on that platform.  I see there is a
precompiled binary available of sqlite3 available for download - what
directory should this be installed in?  If you haven't already guessed from
the question, I'm not vey familiar with WIndows!


http://sqlite.org/download.html

There are several ways to do it. You can get amalgamation - the whole of 
SQLite in a single source file. Then just add it to your project and 
compile it together with the rest of your code.


Or, from the same page, you could get precompiled DLL (look for 
sqlite-dll-win32-x86). You get a DLL and a DEF file. Follow instructions 
at http://msdn.microsoft.com/en-us/library/0b9xe492.aspx to build an 
import library, a LIB file (I assume you are using Visual Studio; 
instructions for other toolchains may differ). Then have your project 
link with that LIB. During deployment, install the DLL (not the LIB) in 
the same directory where you drop your executable.

--
Igor Tandetnik

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Incompatible versions of SQLite on same system

2012-01-26 Thread Joe Winograd

 Original Message 
Subject: Re: [sqlite] Incompatible versions of SQLite on same system
From: epank...@comcast.net
To: General Discussion of SQLite Database 
Date: Tue Jan 24 2012 15:24:00 GMT-0600 (Central Standard Time)

1. Could we please stay on topic

How to post properly in the group is an important topic, especially for newbies.

2. Could we please not go down this road again?
Why not? The archives are just that – archives. Perhaps there are some 
interesting new ideas on the subject. That said, I'll take a look at the 
archives.


If you guys really want to argue about proper posting etiquette and / or using 
something besides an email list, they've both been done to death. Just search 
the archives or start a new thread that's appropriately titled. Just leave it 
out of this one.

Eric




___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Incompatible versions of SQLite on same system

2012-01-26 Thread Joe Winograd

Normand,
I participate in many Google and Yahoo Groups (and am an Owner, Moderator, 
or Manager of several), and while their web interfaces are decent, I still 
prefer to receive posts in my email client, for many reasons. The most 
important reason is search, which, strangely enough, is mediocre in Google 
Groups, but on my local machine is terrific, because I run a top-quality 
search package that indexes everything in the wee hours and provides robust 
searching options. Also, the delete key in my email client works great. :)   
I do participate in some forums that provide an excellent web experience, 
such as Experts Exchange, but those are professional, custom-brew sites that 
were likely very expensive to build. Regards, Joe


 Original Message 
Subject: Re: [sqlite] Incompatible versions of SQLite on same system
From: Normand Mongeau 
To: General Discussion of SQLite Database 
Date: Tue Jan 24 2012 15:19:16 GMT-0600 (Central Standard Time)



On 2012-01-24 16:09, Tim Streater wrote:

On 24 Jan 2012 at 20:02, Joe Winograd  wrote:


Thanks for the idea, but it will not install. The way this group operates
with excessive trimming/snipping ...
No it doesn't. It doesn't do *enough* trimming and snipping, and as a 
result our inboxes grow exponentially. If I want to read a thread I can 
sort by subject and then read it through. But this is made harder by the 
excessive repetition due to inadequate trimming (particularly of .sigs).


--
Cheers  --  Tim





Did you guys ever consider Google Groups or something of the like? Email 
lists are soo clumsy.


Normand


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Incompatible versions of SQLite on same system

2012-01-26 Thread Joe Winograd

Tim,
I disagree completely. It is a rare individual who will read through all of 
the back threads to get a handle on an issue, whereas if it were all there 
in a single message, the person might read it, get up to speed, and jump in. 
As far as your inbox growing, that's easily handled with the delete key. 
Regards, Joe


 Original Message 
Subject: Re: [sqlite] Incompatible versions of SQLite on same system
From: Tim Streater 
To: General Discussion of SQLite Database 
Date: Tue Jan 24 2012 15:09:00 GMT-0600 (Central Standard Time)

On 24 Jan 2012 at 20:02, Joe Winograd  wrote:


Thanks for the idea, but it will not install. The way this group operates
with excessive trimming/snipping ...

No it doesn't. It doesn't do *enough* trimming and snipping, and as a result 
our inboxes grow exponentially. If I want to read a thread I can sort by 
subject and then read it through. But this is made harder by the excessive 
repetition due to inadequate trimming (particularly of .sigs).

--
Cheers  --  Tim




___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Incompatible versions of SQLite on same system

2012-01-26 Thread Joe Winograd

Michael,
That is one very cool utility! As soon as I can get access to the machine, 
I'll give it a spin. Thanks for the tip. Regards, Joe


 Original Message 
Subject: Re: [sqlite] Incompatible versions of SQLite on same system
From: Black, Michael (IS) 
To: General Discussion of SQLite Database 
Date: Wed Jan 25 2012 07:25:52 GMT-0600 (Central Standard Time)

Try this utility on both programs and find out what DLL they are actually going 
for.  And remember that if the DLL is already loaded it will use that.

http://www.dependencywalker.com/

Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Information Systems


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite3 on Windows

2012-01-26 Thread Simon Slavin

On 26 Jan 2012, at 6:49pm, Pete wrote:

> I have been using sqlite on OS X for some time and sqlite3 comes
> pre-installed.  I'm now looking at running some apps on Windows 7 and I
> don't think sqlite3 is pre-installed on that platform.  I see there is a
> precompiled binary available of sqlite3 available for download - what
> directory should this be installed in?  If you haven't already guessed from
> the question, I'm not vey familiar with WIndows!

The precompiled application called sqlite3.exe on Windows, and sqlite3 on the 
Mac, is a stand-alone application that has no part to play when you are running 
other apps.  It's a command-line program that lets you type SQLite commands 
and, just like every other application that uses SQLite3, has its own copy of 
the SQLite functions.

Each application has its own copy of the SQLite3 functions.  Normally they're 
built into the application itself and require no extra installation.  If they 
come as a separate file that needs your attention the app itself should have 
instructions.

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Found it

2012-01-26 Thread Duquette, William H (318K)
On 1/26/12 9:36 AM, "Stephan Beal"  wrote:


>On Thu, Jan 26, 2012 at 2:53 PM, Mohit Sindhwani  wrote:
>
>> Absolutely!  I come home from work and tune in to this thread, gripped
>>:)
>>
>
>+1 to Mohit and the others who's written similar responses. i rarely
>follow
>threads which don't directly affect me, but John Elrick's determination
>and
>stamina have been a treat to watch. IMO he should be made an honorary
>member of the dev team (or at least get a coffee mug).

+1

>
>-- 
>- stephan beal
>http://wanderinghorse.net/home/stephan/
>http://gplus.to/sgbeal
>___
>sqlite-users mailing list
>sqlite-users@sqlite.org
>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] sqlite3 on Windows

2012-01-26 Thread Pete
I have been using sqlite on OS X for some time and sqlite3 comes
pre-installed.  I'm now looking at running some apps on Windows 7 and I
don't think sqlite3 is pre-installed on that platform.  I see there is a
precompiled binary available of sqlite3 available for download - what
directory should this be installed in?  If you haven't already guessed from
the question, I'm not vey familiar with WIndows!


-- 
Pete
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] undefined reference

2012-01-26 Thread Marcel Stumpel
Hi,

 

I' am trying to rebuild application for a TI arm based (cortex A8) target
with the arago compiler (Glibc).

The program was original developed using GNU gcc with ucLibc for a 2.4
kernel.

 

I know get undefined references (see below).

Does anyone have a glue what I am doing wrong?

 

/TQC/TqcToolChain/lib/libsqlite.so: undefined reference to `fcntl64'

/TQC/TqcToolChain/lib/libsqlite.so: undefined reference to
`__fputc_unlocked'

/TQC/TqcToolChain/lib/libsqlite.so: undefined reference to `__ctype_b'

 

regards,

 

Marcel Stumpel

 

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite and Perl

2012-01-26 Thread Puneet Kishor

On Jan 26, 2012, at 11:59 AM, Bill McCormick wrote:

> I need to get going with Perl & SQLite and I'm wondering what I need to get 
> off CPAN, if anything.



$ cpanm DBD::SQLite

there is no step two


> 
> Here's what I think I have now:
> 
> root@fiberio:/etc/cron.daily# locate perl | grep SQLite
> /usr/share/perl/5.10.1/CPANPLUS/Internals/Source/SQLite
> /usr/share/perl/5.10.1/CPANPLUS/Internals/Source/SQLite.pm
> /usr/share/perl/5.10.1/CPANPLUS/Internals/Source/SQLite/Tie.pm
> 
> Since it's been awhile since I've done anything with Perl, is there some 
> gettin' goin' guide?
> 
> 
> Thanks!!!
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] SQLite and Perl

2012-01-26 Thread Bill McCormick
I need to get going with Perl & SQLite and I'm wondering what I need to 
get off CPAN, if anything.


Here's what I think I have now:

root@fiberio:/etc/cron.daily# locate perl | grep SQLite
/usr/share/perl/5.10.1/CPANPLUS/Internals/Source/SQLite
/usr/share/perl/5.10.1/CPANPLUS/Internals/Source/SQLite.pm
/usr/share/perl/5.10.1/CPANPLUS/Internals/Source/SQLite/Tie.pm

Since it's been awhile since I've done anything with Perl, is there some 
gettin' goin' guide?



Thanks!!!
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Query on Sqlite3 in an Android app

2012-01-26 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 26/01/12 09:15, Lavanya Ramanan wrote:
> I have created my own sqlite file from the command prompt. To access
> this database in an Android app, I should use content provider - is
> that what you are saying ?

No.  What I am saying is that if you are providing data to other
components, code or applications then the natural Android way of doing so
is to use a ContentProvider not a raw SQLite database.  Note that this
applies even within the same app.

The code that implements a ContentProvider can combine a SQLite database,
defaults shipped with your app and whatever else is appropriate in order
to supply the data returned by a content provider.

http://developer.android.com/guide/topics/fundamentals.html

> But I thought for using content provider, I create my own database
> using SQL statements in my Java code. So I cannot use my already
> present sqlite file ?

Your application is installed as an APK file which is ultimately a single
zip file with designated contents.  Assets bundled with the app are also
just files within that zip file.  Since you won't be able to open a SQLite
database embedded within that zip file you'll have to take another
approach out of the following:

1: Create the database on the oldest Android version you support
(minSdkVersion).  This ensures that the extra fields Android cares about
are present.  Copy the database from assets to the file system and then
use the database.

2: Store the data but not a database in the assets.  This could take the
form of SQL statements, CSV, binary or other appropriate encoding.  Use
that data to populate the database on first use.

3: In your ContentProvider combine/augment/override the data stored in the
assets with a database (ie no copying from assets to filesystem)

And finally:

> Make sure you use SQLiteOpenHelper for your database usage as it will
> make managing installs/upgrades etc easier.

Roger
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk8hkb8ACgkQmOOfHg372QSzxACgpqflc6Z40l6R0AQ1D642o6DC
cUQAn2jqqHjvWLz3i+ao6koInLVIPgtz
=LoEz
-END PGP SIGNATURE-
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Found it

2012-01-26 Thread John Elrick
On Thu, Jan 26, 2012 at 12:36 PM, Stephan Beal wrote:

> On Thu, Jan 26, 2012 at 2:53 PM, Mohit Sindhwani  wrote:
>
> > Absolutely!  I come home from work and tune in to this thread, gripped :)
> >
>
> +1 to Mohit and the others who's written similar responses. i rarely follow
> threads which don't directly affect me, but John Elrick's determination and
> stamina have been a treat to watch. IMO he should be made an honorary
> member of the dev team (or at least get a coffee mug).
>
>
Thank you.  You made my day.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Found it

2012-01-26 Thread Stephan Beal
On Thu, Jan 26, 2012 at 2:53 PM, Mohit Sindhwani  wrote:

> Absolutely!  I come home from work and tune in to this thread, gripped :)
>

+1 to Mohit and the others who's written similar responses. i rarely follow
threads which don't directly affect me, but John Elrick's determination and
stamina have been a treat to watch. IMO he should be made an honorary
member of the dev team (or at least get a coffee mug).

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Query on Sqlite3 in an Android app

2012-01-26 Thread Lavanya Ramanan
Thank you for your reply.

I have created my own sqlite file from the command prompt. To access this
database in an Android app, I should use content provider - is that what
you are saying ?
But I thought for using content provider, I create my own database using
SQL statements in my Java code. So I cannot use my already present sqlite
file ?

I am sorry for the naive quetsions. I am very new to this.

Thanks.

On Wed, Jan 25, 2012 at 6:22 PM, Roger Binns  wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On 25/01/12 14:31, Lavanya Ramanan wrote:
> > What am i missing?
>
> The SQLite Java wrapper in Android automatically creates the directory
> when you use it to create a database.  Since you are bypassing that you'll
> need to create the directory yourself manually.
>
> However I'd advise you against this whole approach.  There are more behind
> the scenes fields now (eg user version), and the approach taken will be
> brittle for future changes in the Android platform.
>
> You can store the raw data in your assets and then populate the database
> on first use.  The data format used in your assets can be optimised for
> its usage as you'll only be reading from it sequentially (eq SQL text,
> CSV, binary, compressed, incrementing field omitted, de-normalized).
>
> You can expose data as a ContentProvider instead of as SQLite.  Your
> content provider can then combine/augment/override the assets data and the
> database as is appropriate.
>
> If you do still want to do a file copy then the most compatible approach
> is to create the database in an emulator running your oldest supported
> Android version (minSdkVersion) as that will ensure all needed behind the
> scenes fields are present and Android will know how to upgrade when used
> on more recent versions.
>
> Make sure you use SQLiteOpenHelper for your database usage as it will make
> managing installs/upgrades etc easier.
>
> Roger
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.11 (GNU/Linux)
>
> iEYEARECAAYFAk8gjrEACgkQmOOfHg372QTyiQCfd/eg2CMd9Xa/1hYlqFeb6OI5
> DS8AoKQ3WzdYgVTtA0rs2JK6GJtlgnTP
> =O1jv
> -END PGP SIGNATURE-
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Found it

2012-01-26 Thread John Elrick
On Thu, Jan 26, 2012 at 3:29 AM, Jean-Denis MUYS wrote:

>
> On 25 janv. 2012, at 22:30, John Elrick wrote:
>
> >
> > I have to say this has been a fascinating learning experience.  It has
> been
> > enlightening reading the SQLite code and beginning to understand its
> inner
> > workings.
> > John
> > ___
>
> What a thriller! I was holding my breath. Did you think about selling the
> rights to this story to a movie studio?


Steven Spielberg just bought the rights.  He outbid James Cameron by a
million.  Should be in theaters Summer 2014.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Found it

2012-01-26 Thread Mohit Sindhwani

On 26/1/2012 5:21 AM, Nico Williams wrote:

On Wed, Jan 25, 2012 at 3:07 PM, Richard Hipp  wrote:

The SQLite byte-code engine was being too conservative and was reparsing
the schema in places where it was not strictly necessary.  The fix was to
restrict the places where the schema was reparsed to situations that really
needed it.

This thread has been awesome, gripping reading.  Thanks to both of you
for sticking with it and figuring it out.



Absolutely!  I come home from work and tune in to this thread, gripped :)

Thanks,
Mohit.
26/1/2012 | 9:53 PM.



___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite3_bind_text data conversion

2012-01-26 Thread Simon Slavin

On 26 Jan 2012, at 12:15pm, darkelf wrote:

> rez = sqlite3_exec(ss_pdb, "CREATE TABLE T(str STRING, val INTEGER);", NULL, 
> NULL, NULL);

Datatypes in SQLite are as follows:

http://www.sqlite.org/datatype3.html

Your word 'STRING' is being interpreted as a numeric affinity.  And as the 
value you provide can be understood as a number, SQLite is storing the number.  
It would be more appropriate to define the 'str' column as 'TEXT'.  Hope this 
helps.

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] sqlite3_bind_text data conversion

2012-01-26 Thread darkelf
Hello, all.

Could   anybody  clarify  to  me  data  conversion  done  in
sqlite3_bind_text(), please?

I've written simple test:

test.c
;--X8
#include 
#include "sqlite3.h"

int main(int argc, char* argv[])
{ int rez = 0;
  sqlite3* ss_pdb = NULL;
  sqlite3_stmt* st;

  rez = sqlite3_open_v2("base", &ss_pdb, SQLITE_OPEN_READWRITE | 
SQLITE_OPEN_CREATE, NULL);

  do
  { rez = sqlite3_exec(ss_pdb, "CREATE TABLE T(str STRING, val INTEGER);", 
NULL, NULL, NULL);
if (rez != SQLITE_OK)
  break;

rez = sqlite3_prepare_v2(ss_pdb, "INSERT INTO T (str, val) VALUES (?,?);", 
-1, &st, NULL);
if (rez != SQLITE_OK)
  break;

rez = sqlite3_bind_text(st, 1, "0001", -1, SQLITE_TRANSIENT);
if (rez != SQLITE_OK)
  break;

rez = sqlite3_bind_int(st, 2, 123);
if (rez != SQLITE_OK)
{ printf("sqlite error: %s\n", sqlite3_errmsg(ss_pdb));
  break;
}

rez = sqlite3_step(st);
if (rez != SQLITE_DONE)
  break;
sqlite3_finalize(st);
  } while (0);

  sqlite3_close(ss_pdb);

  return rez;
}
;--X8

makefile.vc
;--X8
CC=cl
CFLAGS=/MD  /DWIN32 /nologo /GX /GA /O2 /W3 /GF /D_WIN32_WINNT=0x500
BIN=test.exe
OBJ=test.obj sqlite3.obj
RM=del
RFLAGS=

all: $(BIN)

$(BIN): $(OBJ)
$(CC) $(CFLAGS) $(OBJ) /Fe$(BIN)

%.obj: %.c
$(CC) $(CFLAGS) /c $<

clean:
-$(RM) $(RFLAGS) $(BIN) 2>nul
-$(RM) $(RFLAGS) $(OBJ) 2>nul
;--X8

It  works  fine,  without  any  errors,  but  when I checked
database by sqlite3 utility, I found that value of str field
is  not  equal  to  "0001",  instead it is equal to "1".

I'd changed line with INSERT statement to

;--X8
rez = sqlite3_prepare_v2(ss_pdb, "INSERT INTO T (str, val) VALUES 
('?',?);", -1, &st, NULL);
;--X8

and  got  error  SQLITE_RANGE  ("bind or column index out of
range") in next bind after sqlite3_bind_text().

;--X8
rez = sqlite3_bind_int(st, 2, 123);
;--X8

How   can  I  insert  string/text  value  in  table  without
conversion?

OS: Windows XP, compiler - Microsoft Visual C++ 6.0

-- 
WBR,
 darkelf  mailto:dark...@ukr.net

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Found it

2012-01-26 Thread Jean-Denis MUYS

On 25 janv. 2012, at 22:30, John Elrick wrote:

> 
> I have to say this has been a fascinating learning experience.  It has been
> enlightening reading the SQLite code and beginning to understand its inner
> workings. 
> John
> ___

What a thriller! I was holding my breath. Did you think about selling the 
rights to this story to a movie studio?

Jean-Denis

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] FirstOrDefault crashes using linq

2012-01-26 Thread Truls Haaland
--- Den ons 2012-01-25 skrev Joe Mistachkin :
> The supported alternative here is the ObjectContext class
> from the Entity Framework

Thank you. I will check this out.
I am not using the Entity Framework, so I will have to figure out how to create 
an ObjectContext manually. I guess I'm off Googling then.

What I am ultimately trying to do is replace MSSQL with SQLite in an existing 
application that uses LINQ. So I was hoping that I could do this with minimal 
changes to the application (otherwise I will probably not get the ok for this).

Again, thanks for helping.

Truls.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] 3.7.10 problem : SQLite header and source version mismatch

2012-01-26 Thread Kevin Youren
Thank you, Kevin Benson, for your hint about ldconfig

Using ldconfig -p , I found their is an older version of libsqlite3
in /usr/lib/i386-linux-gnu

So I replaced it with my compiled 3.7.10 version , and now sqlite3 works
from the command line.

regs,

Kevin Youren

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users