Re: [sqlite] FreeBSD and SQLITE_ENABLE_LOCKING_STYLE

2013-04-10 Thread Richard Hipp
On Wed, Apr 10, 2013 at 6:40 PM, Baptiste Daroussin < baptiste.darous...@gmail.com> wrote: > I'm trying to activate SQLITE_ENABLE_LOCKING_STYLE=1 on FreeBSD. > The SQLITE_ENABLE_LOCKING_STYLE compile-time option is code that was contributed and supported by Apple specifically for use on Mac

[sqlite] FreeBSD and SQLITE_ENABLE_LOCKING_STYLE

2013-04-10 Thread Baptiste Daroussin
I'm trying to activate SQLITE_ENABLE_LOCKING_STYLE=1 on FreeBSD. We use SQLite for our new package manager and we get a report from a user about a totally corrupted database when on nfsv4. I want to try activating this option, but received a compilation failure sqlite3.c:28290:14: error:

Re: [sqlite] Database modeling question

2013-04-10 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/04/13 13:42, Alem Biscan wrote: > For a job interview I am required among other things to create a phone > book application. It would be easy to spend a year on that! You are probably better off showing something short, simple and

Re: [sqlite] Database modeling question

2013-04-10 Thread Gert Van Assche
not an expert in this matter, but the more simple the better. I think however you should anticipate 2 situations: one person having more than one or two phone numbers, and 2 people sharing the same phone number. Next to that, maybe it would be smart to show them that you know not all phones these

[sqlite] Database modeling question

2013-04-10 Thread Alem Biscan
Hello Comunity, I have a question that is more of database modeling theory ( normalisation / data organisation ) nature. Please advise me. For a job interview I am required among other things to create a phone book application. I am thinking about database design. Although it is a simple

Re: [sqlite] ORDER BY finds "AS" names ambiguous that shouldn't be?

2013-04-10 Thread Perry Wagle
On Apr 10, 2013, at 12:40 PM, Richard Hipp wrote: > On Wed, Apr 10, 2013 at 3:37 PM, Perry Wagle wrote: > >> >> On Apr 10, 2013, at 5:53 AM, Stephen Chrzanowski >> wrote: >> >>> Has the schema changed on one of the underlying table

Re: [sqlite] ORDER BY finds "AS" names ambiguous that shouldn't be?

2013-04-10 Thread Richard Hipp
On Wed, Apr 10, 2013 at 3:37 PM, Perry Wagle wrote: > > On Apr 10, 2013, at 5:53 AM, Stephen Chrzanowski > wrote: > > > Has the schema changed on one of the underlying table between 19 and 20 > > that includes a field called Title? > > I did the query (see my

Re: [sqlite] ORDER BY finds "AS" names ambiguous that shouldn't be?

2013-04-10 Thread Perry Wagle
On Apr 10, 2013, at 5:53 AM, Stephen Chrzanowski wrote: > Has the schema changed on one of the underlying table between 19 and 20 > that includes a field called Title? I did the query (see my previous response) with a different version of sqlite3 (3.7.16.1) on a places

Re: [sqlite] ORDER BY finds "AS" names ambiguous that shouldn't be?

2013-04-10 Thread Perry Wagle
On Apr 10, 2013, at 5:33 AM, Richard Hipp wrote: > On Wed, Apr 10, 2013 at 4:39 AM, Perry Wagle wrote: > >> I have a problem with a field name being ambiguous when it wasn't before. >> Is this a bug or a feature? >> >> Firefox 19 uses Sqlite 3.7.14.1 which

Re: [sqlite] A sqlite database changing the contents when I change the database name or user rights

2013-04-10 Thread Kees Nuyt
On Wed, 10 Apr 2013 08:24:42 +, Bernardino Flores/Jeanologia wrote: > Any idea about what is happening? Three causes come to mind: 1) Is your database in a system-protected directory, like "C:\Program Files" or "C:\Program Files(x86)"? If so, Windows

Re: [sqlite] Getting row count for all the tables with a single SQL execute command

2013-04-10 Thread Dominique Devienne
On Wed, Apr 10, 2013 at 5:56 PM, Igor Tandetnik wrote: > On 4/10/2013 11:47 AM, Bheemrao, Veeresh wrote: > >> I would like to know is there any way to get row count for all the tables >> in a database using single Execute command? >> > > select (select count(*) from table1),

Re: [sqlite] Getting row count for all the tables with a single SQL execute command

2013-04-10 Thread Igor Tandetnik
On 4/10/2013 11:47 AM, Bheemrao, Veeresh wrote: I would like to know is there any way to get row count for all the tables in a database using single Execute command? select (select count(*) from table1), (select count(*) from table2), ...; There is no system table that stores row counts for

[sqlite] Getting row count for all the tables with a single SQL execute command

2013-04-10 Thread Bheemrao, Veeresh
Hi, I would like to know is there any way to get row count for all the tables in a database using single Execute command? I have a query which will do this job in SqlServer (http://www.mssqltips.com/sqlservertip/2537/sql-server-row-count-for-all-tables-in-a-database/ ) but wanted to know if

Re: [sqlite] When is column type valid?

2013-04-10 Thread Dominique Devienne
On Wed, Apr 10, 2013 at 5:16 PM, Igor Tandetnik wrote: > On 4/10/2013 10:06 AM, ven...@intouchmi.com wrote: > >> The call to sqlite3_col_decltype returns a char * >> Should I issue a sqlite3_free on it when I am done with the string? >> > > No. It gives you a pointer into an

Re: [sqlite] When is column type valid?

2013-04-10 Thread Igor Tandetnik
On 4/10/2013 10:06 AM, ven...@intouchmi.com wrote: The call to sqlite3_col_decltype returns a char * Should I issue a sqlite3_free on it when I am done with the string? No. It gives you a pointer into an internal data structure associated with the statement handle. The memory will be

Re: [sqlite] When is column type valid?

2013-04-10 Thread veneff
Yes, it does work after step and before get column value. Thanks for your help in this. A quick follow up: The call to sqlite3_col_decltype returns a char * Should I issue a sqlite3_free on it when I am done with the string? Vance on Apr 10, 2013, Igor Tandetnik wrote: >

Re: [sqlite] When is column type valid?

2013-04-10 Thread Igor Tandetnik
On 4/10/2013 9:28 AM, ven...@intouchmi.com wrote: I repeated my test with sqlite3_column_type and doing the call after a successful call to sqlite3_column_text still always yields SQLITE_NULL. Just as the documentation suggests. Call sqlite3_column_type right after sqlite3_step and before

Re: [sqlite] When is column type valid?

2013-04-10 Thread veneff
Sorry, I did mean sqlite3_column_decltype. I repeated my test with sqlite3_column_type and doing the call after a successful call to sqlite3_column_text still always yields SQLITE_NULL. When changing the call to sqlite3_column_decltype, I do get the column declarations. So, all I need to do is

Re: [sqlite] ORDER BY finds "AS" names ambiguous that shouldn't be?

2013-04-10 Thread Stephen Chrzanowski
Has the schema changed on one of the underlying table between 19 and 20 that includes a field called Title? On Wed, Apr 10, 2013 at 8:33 AM, Richard Hipp wrote: > On Wed, Apr 10, 2013 at 4:39 AM, Perry Wagle wrote: > > > I have a problem with a field name being

Re: [sqlite] 64bit compatibility warnings

2013-04-10 Thread Dave McKee
> By definition, A % B < B. Thus, if B fits into an int (be it 32-bit or > 16-bit or otherwise), then A % B would too. I'm not sure this is *strictly* true if negative numbers are involved; e.g. -4 % -3 = -1. But it's still true to say it's closer to zero, and thus should always fit into an int.

Re: [sqlite] ORDER BY finds "AS" names ambiguous that shouldn't be?

2013-04-10 Thread Richard Hipp
On Wed, Apr 10, 2013 at 4:39 AM, Perry Wagle wrote: > I have a problem with a field name being ambiguous when it wasn't before. > Is this a bug or a feature? > > Firefox 19 uses Sqlite 3.7.14.1 which does what it should. Firefox 20 > uses Sqlite 3.7.15.2 which complains that

Re: [sqlite] Problem with exporting tables

2013-04-10 Thread Simon Slavin
On 10 Apr 2013, at 12:39pm, "Simon Sawatzki" wrote: > I remember that it once worked for me, but unfortunately now it does not > anymore. I would be happy if somebody could help so that I can export and > import data as CSV for easy external editing. The software you

[sqlite] Problem with exporting tables

2013-04-10 Thread Simon Sawatzki
Hi everyone, I am new to this list, so please forgive me if I am doing something wrong. I subscribed here because I have a problem with exporting tables of SQL files and cannot seem to find the solution although I have already tried the FAQ / manual. So here is my problem: I open a SQL file

[sqlite] ORDER BY finds "AS" names ambiguous that shouldn't be?

2013-04-10 Thread Perry Wagle
I have a problem with a field name being ambiguous when it wasn't before. Is this a bug or a feature? Firefox 19 uses Sqlite 3.7.14.1 which does what it should. Firefox 20 uses Sqlite 3.7.15.2 which complains that "title" is ambiguous in the ORDER BY in the below query: SELECT (CASE

Re: [sqlite] A sqlite database changing the contents when I change the database name or user rights

2013-04-10 Thread Bernardino Flores/Jeanologia
Andreas, Are you possibly running into: http://en.wikipedia.org/wiki/Shadow_Copy http://windows.microsoft.com/en-ca/windows-vista/previous-versions-of-files-frequently-asked-questions? I have checked the service VSS and is stopped. I will attach the same e-mail that I sent to Simon Slaving,

Re: [sqlite] A sqlite database changing the contents when I change the database name or user rights

2013-04-10 Thread Bernardino Flores/Jeanologia
Simon, "Are you certain you're not looking at two files with the same name in different directories ?" I am not looking in different directories, I will attach 2 pictures in wich is shown a db called "prefs.db" and a "prefs - copia.db" with is a copy from the "prefs.db". Both are been opened

Re: [sqlite] 64bit compatibility warnings

2013-04-10 Thread Scott Robison
On 4/8/2013 5:41 AM, Richard Hipp wrote: Line 6766 u.bc.r.flags = (u16)(UNPACKED_INCRKEY * (1 & (u.bc.oc - OP_SeekLt))); WARNING: conversion from 'u16' to 'u8', possible loss of data Line 71133 iBuf = p->iReadOff % p->nBuffer; WARNING: conversion from 'i64' to 'int', possible