Re: [sqlite] Sqlite ubuntu 12.10 compile/install

2013-01-30 Thread Christopher Vance
C is not a subset of C++, although it has been close.

Do not compile C with a C++ compiler, or you'll discover one of the
bits where if fails.

-- Christopher

On 31 January 2013 07:27, David Clark  wrote:
> This has been resolved...solution:
> 1) use gcc not g++.
> 2) grab the lastest source from sqlite.org.  There was a version update in 
> doing that.  But now it seems good on both
> operating systems.
>
> Thank you,
>
> David Clark
>
>
>
>>
>> From: Michael Black 
>>To: 'David Clark' ; 'General Discussion of SQLite 
>>Database' 
>>Sent: Wednesday, January 30, 2013 9:30 AM
>>Subject: RE: [sqlite] Sqlite ubuntu 12.10 compile/install
>>
>>Use the amalgamation:
>>
>>cc -O -c sqlite3.c
>>
>>Then link it into your program.  Most of us recommend avoiding shared
>>libraries.
>>
>>If you need special features you may have to set some flags.
>>
>>
>>-Original Message-
>>From: sqlite-users-boun...@sqlite.org
>>[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of David Clark
>>Sent: Wednesday, January 30, 2013 9:06 AM
>>To: sqlite-users@sqlite.org
>>Subject: [sqlite] Sqlite ubuntu 12.10 compile/install
>>
>>Ok I have used sqlite in windows software no problems.
>>I am now trying to use it in software I am porting to ubuntu 12.10 and I am
>>finding that the source code I used under windows has compile issues.  And
>>when I downloaded the .gz file and ran ./configure on that fileset I got
>>errors
>>on that.
>>
>>I know I not being specific on the errors I got.  But my question here is...
>>basically under ubuntu what should my procedure be for installing and
>>compiling sqlite?  Yes I am new to ubuntu so the obvious is not so obvious
>>on that OS.
>>
>>Thank you,
>>
>>David Clark
>>___
>>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



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


Re: [sqlite] SQL query

2013-01-30 Thread Michael Black
You need to start showing your testinga .dump of your tables might help
plus show what you execute in the shell.
This works just fine and appears to produce what you want.
I don't know what you want #1 in your 1st question as the hash matches #0
which is what you said you want to exclude.

SQLite version 3.7.14.1 2012-10-04 19:37:12
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> create table files(file,setid,hash);
sqlite> insert into files
values('file1',0,'8465-CEEF-126A-0F04-1EDC-1D7B-331F-9279');
sqlite> insert into files
values('file1',1,'8465-CEEF-126A-0F04-1EDC-1D7B-331F-9279');
sqlite> insert into files
values('file1',2,'8465-CEEF-126A-0F04-1EDC-1D7B-331F-9279');
sqlite> insert into files
values('file1',3,'B2F9-B5D4-A427-9FE2-9724-BF95-1571-7CE5');
sqlite> insert into files
values('file1',4,'0546-4667-5A69-6478-FC97-6F27-840D-7D62');
sqlite> insert into files
values('file1',5,'0546-4667-5A69-6478-FC97-6F27-840D-7D62');
sqlite> insert into files
values('file1',6,'0546-4667-5A69-6478-FC97-6F27-840D-7D62');
sqlite> insert into files
values('file1',7,'01EE-7E2E-2242-E734-B125-D02F-A7F0-DC29');
sqlite> insert into files
values('file1',8,'01EE-7E2E-2242-E734-B125-D02F-A7F0-DC29');
sqlite> SELECT * FROM files WHERE hash NOT IN (SELECT hash FROM files WHERE
setid=0);
file1|3|B2F9-B5D4-A427-9FE2-9724-BF95-1571-7CE5
file1|4|0546-4667-5A69-6478-FC97-6F27-840D-7D62
file1|5|0546-4667-5A69-6478-FC97-6F27-840D-7D62
file1|6|0546-4667-5A69-6478-FC97-6F27-840D-7D62
file1|7|01EE-7E2E-2242-E734-B125-D02F-A7F0-DC29
file1|8|01EE-7E2E-2242-E734-B125-D02F-A7F0-DC29
sqlite> SELECT * FROM files WHERE hash NOT IN (SELECT hash FROM files WHERE
setid=0) group by hash;
file1|8|01EE-7E2E-2242-E734-B125-D02F-A7F0-DC29
file1|6|0546-4667-5A69-6478-FC97-6F27-840D-7D62
file1|3|B2F9-B5D4-A427-9FE2-9724-BF95-1571-7CE5
sqlite> delete from files where setid=0;
sqlite> SELECT * FROM files WHERE hash NOT IN (SELECT hash FROM files WHERE
setid=0);
file1|1|8465-CEEF-126A-0F04-1EDC-1D7B-331F-9279
file1|2|8465-CEEF-126A-0F04-1EDC-1D7B-331F-9279
file1|3|B2F9-B5D4-A427-9FE2-9724-BF95-1571-7CE5
file1|4|0546-4667-5A69-6478-FC97-6F27-840D-7D62
file1|5|0546-4667-5A69-6478-FC97-6F27-840D-7D62
file1|6|0546-4667-5A69-6478-FC97-6F27-840D-7D62
file1|7|01EE-7E2E-2242-E734-B125-D02F-A7F0-DC29
file1|8|01EE-7E2E-2242-E734-B125-D02F-A7F0-DC29
sqlite> SELECT * FROM files WHERE hash NOT IN (SELECT hash FROM files WHERE
setid=0) group by hash;
file1|8|01EE-7E2E-2242-E734-B125-D02F-A7F0-DC29
file1|6|0546-4667-5A69-6478-FC97-6F27-840D-7D62
file1|2|8465-CEEF-126A-0F04-1EDC-1D7B-331F-9279
file1|3|B2F9-B5D4-A427-9FE2-9724-BF95-1571-7CE5

-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Paul Sanderson
Sent: Wednesday, January 30, 2013 4:33 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] SQL query

Thanks - replace set with setid - query is the same (it was badly
simplified sorry)

Another real world example using the sql query

SELECT * FROM files WHERE hash NOT IN (SELECT hash FROM files WHERE
setid=0);

file1 08465-CEEF-126A-0F04-1EDC-1D7B-331F-9279
file1 18465-CEEF-126A-0F04-1EDC-1D7B-331F-9279
file1 28465-CEEF-126A-0F04-1EDC-1D7B-331F-9279
file1 3B2F9-B5D4-A427-9FE2-9724-BF95-1571-7CE5
file1 40546-4667-5A69-6478-FC97-6F27-840D-7D62
file1 50546-4667-5A69-6478-FC97-6F27-840D-7D62
file1 60546-4667-5A69-6478-FC97-6F27-840D-7D62
file1 701EE-7E2E-2242-E734-B125-D02F-A7F0-DC29
file1 801EE-7E2E-2242-E734-B125-D02F-A7F0-DC29

I get an empty data set again, what I want is something like this

file1 18465-CEEF-126A-0F04-1EDC-1D7B-331F-9279
file1 3B2F9-B5D4-A427-9FE2-9724-BF95-1571-7CE5
file1 60546-4667-5A69-6478-FC97-6F27-840D-7D62
file1 801EE-7E2E-2242-E734-B125-D02F-A7F0-DC29


also there could be instances where  there is no setid=0 row, as below, in
this case I would want the same dataset as returned above

file1 18465-CEEF-126A-0F04-1EDC-1D7B-331F-9279
file1 28465-CEEF-126A-0F04-1EDC-1D7B-331F-9279
file1 3B2F9-B5D4-A427-9FE2-9724-BF95-1571-7CE5
file1 40546-4667-5A69-6478-FC97-6F27-840D-7D62
file1 50546-4667-5A69-6478-FC97-6F27-840D-7D62
file1 60546-4667-5A69-6478-FC97-6F27-840D-7D62
file1 701EE-7E2E-2242-E734-B125-D02F-A7F0-DC29
file1 801EE-7E2E-2242-E734-B125-D02F-A7F0-DC29



On 30 January 2013 22:14, Michael Black  wrote:

> 'set' is a reserved word.  I get an error running your select statement.
>
> Change it.
>
>
> SQLite version 3.7.14.1 2012-10-04 19:37:12
> Enter ".help" for instructions
> Enter SQL statements terminated with a ";"
> sqlite> create table files(file,setid,hash);
> sqlite> insert into files
> values('1.jpg',0,'5DA4-CD3A-62DE-2F9D-4BD7-6E24-EACE-936D');
> sqlite> insert into files
> values('1.jpg',1,'5DA4-CD3A-62DE-2F9D-4BD7-6E24-EACE-936D');
> sqlite> insert into files
> 

Re: [sqlite] SQL query

2013-01-30 Thread Paul Sanderson
Thanks - replace set with setid - query is the same (it was badly
simplified sorry)

Another real world example using the sql query

SELECT * FROM files WHERE hash NOT IN (SELECT hash FROM files WHERE
setid=0);

file1 08465-CEEF-126A-0F04-1EDC-1D7B-331F-9279
file1 18465-CEEF-126A-0F04-1EDC-1D7B-331F-9279
file1 28465-CEEF-126A-0F04-1EDC-1D7B-331F-9279
file1 3B2F9-B5D4-A427-9FE2-9724-BF95-1571-7CE5
file1 40546-4667-5A69-6478-FC97-6F27-840D-7D62
file1 50546-4667-5A69-6478-FC97-6F27-840D-7D62
file1 60546-4667-5A69-6478-FC97-6F27-840D-7D62
file1 701EE-7E2E-2242-E734-B125-D02F-A7F0-DC29
file1 801EE-7E2E-2242-E734-B125-D02F-A7F0-DC29

I get an empty data set again, what I want is something like this

file1 18465-CEEF-126A-0F04-1EDC-1D7B-331F-9279
file1 3B2F9-B5D4-A427-9FE2-9724-BF95-1571-7CE5
file1 60546-4667-5A69-6478-FC97-6F27-840D-7D62
file1 801EE-7E2E-2242-E734-B125-D02F-A7F0-DC29


also there could be instances where  there is no setid=0 row, as below, in
this case I would want the same dataset as returned above

file1 18465-CEEF-126A-0F04-1EDC-1D7B-331F-9279
file1 28465-CEEF-126A-0F04-1EDC-1D7B-331F-9279
file1 3B2F9-B5D4-A427-9FE2-9724-BF95-1571-7CE5
file1 40546-4667-5A69-6478-FC97-6F27-840D-7D62
file1 50546-4667-5A69-6478-FC97-6F27-840D-7D62
file1 60546-4667-5A69-6478-FC97-6F27-840D-7D62
file1 701EE-7E2E-2242-E734-B125-D02F-A7F0-DC29
file1 801EE-7E2E-2242-E734-B125-D02F-A7F0-DC29



On 30 January 2013 22:14, Michael Black  wrote:

> 'set' is a reserved word.  I get an error running your select statement.
>
> Change it.
>
>
> SQLite version 3.7.14.1 2012-10-04 19:37:12
> Enter ".help" for instructions
> Enter SQL statements terminated with a ";"
> sqlite> create table files(file,setid,hash);
> sqlite> insert into files
> values('1.jpg',0,'5DA4-CD3A-62DE-2F9D-4BD7-6E24-EACE-936D');
> sqlite> insert into files
> values('1.jpg',1,'5DA4-CD3A-62DE-2F9D-4BD7-6E24-EACE-936D');
> sqlite> insert into files
> values('1.jpg',2,'5DA4-CD3A-62DE-2F9D-4BD7-6E24-EACE-936D');
> sqlite> insert into files
> values('1.jpg',3,'5DA4-CD3A-62DE-2F9D-4BD7-6E24-EACE-936D');
> sqlite> insert into files
> values('1.jpg',4,'890B-4533-447E-6461-070E-FDB7-799E-1FB8');
> sqlite> SELECT * FROM files WHERE hash NOT IN (SELECT hash FROM files WHERE
> setid=0);
> 1.jpg|4|890B-4533-447E-6461-070E-FDB7-799E-1FB8
>
>
> -Original Message-
> From: sqlite-users-boun...@sqlite.org
> [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Paul Sanderson
> Sent: Wednesday, January 30, 2013 4:05 PM
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] SQL query
>
> I have a test set with the following real data
>
> 1.jpg05DA4-CD3A-62DE-2F9D-4BD7-6E24-EACE-936D
> 1.jpg15DA4-CD3A-62DE-2F9D-4BD7-6E24-EACE-936D
> 1.jpg25DA4-CD3A-62DE-2F9D-4BD7-6E24-EACE-936D
> 1.jpg35DA4-CD3A-62DE-2F9D-4BD7-6E24-EACE-936D
> 1.jpg4890B-4533-447E-6461-070E-FDB7-799E-1FB8
>
> SELECT * FROM files WHERE hash NOT IN (SELECT hash FROM files WHERE set=0)
>
> returns an empty data set, but should return the item from set 4
>
> The following does work
>
> select * from files where set > 0 and not exists (select * from files a
> where hash=files.hash and set=0);
>
> which is great and solves my problem, but I cant see why the first query
> doesn't work.
>
>
> On 30 January 2013 21:37, Paul Sanderson
> wrote:
>
> >
> > Thanks All - duplicated means the content is the same as well as the
> name,
> > different is the filename is the same but the content is different.
> >
> > I need to refine my query to produce only one copy of any that is not in
> > set 0
> >
> > file10ABCD
> > file11ABCD
> > file13EF01
> > file20BCE2
> > file22BCE2
> > file35EE34
> > file40EE22
> > file41FF34
> > file43FF34
> > file44FF34
> >
> >
> > My query would return
> >
> > file13EF01
> > file35EE34
> > file41FF34, or file43FF34, or file44FF34
> >
> > Thanks
> >
> >
> >
>
>
> --
> Paul
> www.sandersonforensics.com
> skype: r3scue193
> twitter: @sandersonforens
> Tel +44 (0)1326 572786
> ___
> 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
>



-- 
Paul
www.sandersonforensics.com
skype: r3scue193
twitter: @sandersonforens
Tel +44 (0)1326 572786
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQL query

2013-01-30 Thread Michael Black
'set' is a reserved word.  I get an error running your select statement.

Change it.


SQLite version 3.7.14.1 2012-10-04 19:37:12
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> create table files(file,setid,hash);
sqlite> insert into files
values('1.jpg',0,'5DA4-CD3A-62DE-2F9D-4BD7-6E24-EACE-936D');
sqlite> insert into files
values('1.jpg',1,'5DA4-CD3A-62DE-2F9D-4BD7-6E24-EACE-936D');
sqlite> insert into files
values('1.jpg',2,'5DA4-CD3A-62DE-2F9D-4BD7-6E24-EACE-936D');
sqlite> insert into files
values('1.jpg',3,'5DA4-CD3A-62DE-2F9D-4BD7-6E24-EACE-936D');
sqlite> insert into files
values('1.jpg',4,'890B-4533-447E-6461-070E-FDB7-799E-1FB8');
sqlite> SELECT * FROM files WHERE hash NOT IN (SELECT hash FROM files WHERE
setid=0);
1.jpg|4|890B-4533-447E-6461-070E-FDB7-799E-1FB8


-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Paul Sanderson
Sent: Wednesday, January 30, 2013 4:05 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] SQL query

I have a test set with the following real data

1.jpg05DA4-CD3A-62DE-2F9D-4BD7-6E24-EACE-936D
1.jpg15DA4-CD3A-62DE-2F9D-4BD7-6E24-EACE-936D
1.jpg25DA4-CD3A-62DE-2F9D-4BD7-6E24-EACE-936D
1.jpg35DA4-CD3A-62DE-2F9D-4BD7-6E24-EACE-936D
1.jpg4890B-4533-447E-6461-070E-FDB7-799E-1FB8

SELECT * FROM files WHERE hash NOT IN (SELECT hash FROM files WHERE set=0)

returns an empty data set, but should return the item from set 4

The following does work

select * from files where set > 0 and not exists (select * from files a
where hash=files.hash and set=0);

which is great and solves my problem, but I cant see why the first query
doesn't work.


On 30 January 2013 21:37, Paul Sanderson
wrote:

>
> Thanks All - duplicated means the content is the same as well as the name,
> different is the filename is the same but the content is different.
>
> I need to refine my query to produce only one copy of any that is not in
> set 0
>
> file10ABCD
> file11ABCD
> file13EF01
> file20BCE2
> file22BCE2
> file35EE34
> file40EE22
> file41FF34
> file43FF34
> file44FF34
>
>
> My query would return
>
> file13EF01
> file35EE34
> file41FF34, or file43FF34, or file44FF34
>
> Thanks
>
>
>


-- 
Paul
www.sandersonforensics.com
skype: r3scue193
twitter: @sandersonforens
Tel +44 (0)1326 572786
___
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] SQL query

2013-01-30 Thread Paul Sanderson
I have a test set with the following real data

1.jpg05DA4-CD3A-62DE-2F9D-4BD7-6E24-EACE-936D
1.jpg15DA4-CD3A-62DE-2F9D-4BD7-6E24-EACE-936D
1.jpg25DA4-CD3A-62DE-2F9D-4BD7-6E24-EACE-936D
1.jpg35DA4-CD3A-62DE-2F9D-4BD7-6E24-EACE-936D
1.jpg4890B-4533-447E-6461-070E-FDB7-799E-1FB8

SELECT * FROM files WHERE hash NOT IN (SELECT hash FROM files WHERE set=0)

returns an empty data set, but should return the item from set 4

The following does work

select * from files where set > 0 and not exists (select * from files a
where hash=files.hash and set=0);

which is great and solves my problem, but I cant see why the first query
doesn't work.


On 30 January 2013 21:37, Paul Sanderson wrote:

>
> Thanks All - duplicated means the content is the same as well as the name,
> different is the filename is the same but the content is different.
>
> I need to refine my query to produce only one copy of any that is not in
> set 0
>
> file10ABCD
> file11ABCD
> file13EF01
> file20BCE2
> file22BCE2
> file35EE34
> file40EE22
> file41FF34
> file43FF34
> file44FF34
>
>
> My query would return
>
> file13EF01
> file35EE34
> file41FF34, or file43FF34, or file44FF34
>
> Thanks
>
>
>


-- 
Paul
www.sandersonforensics.com
skype: r3scue193
twitter: @sandersonforens
Tel +44 (0)1326 572786
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQL query

2013-01-30 Thread Michael Black
sqlite> create table t(name,num,ref);
sqlite> insert into t values('file1',0,'ABCD');
sqlite> insert into t values('file1',1,'ABCD');
sqlite> insert into t values('file1',3,'EF01');
sqlite> insert into t values('file2',0,'BCE2');
sqlite> insert into t values('file2',2,'BCE2');
sqlite> insert into t values('file3',5,'EE34');
sqlite> insert into t values('file4',0,'EE22');
sqlite> insert into t values('file4',1,'FF34');
sqlite> insert into t values('file4',3,'FF34');
sqlite> insert into t values('file4',4,'FF34');
sqlite> select distinct(ref) from t where ref not in (select ref from t
where num=0);
EF01
EE34
FF34

-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Paul Sanderson
Sent: Wednesday, January 30, 2013 3:37 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] SQL query

Thanks All - duplicated means the content is the same as well as the name,
different is the filename is the same but the content is different.

I need to refine my query to produce only one copy of any that is not in
set 0

file10ABCD
file11ABCD
file13EF01
file20BCE2
file22BCE2
file35EE34
file40EE22
file41FF34
file43FF34
file44FF34

My query would return

file13EF01
file35EE34
file41FF34, or file43FF34, or file44FF34

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


Re: [sqlite] SQL query

2013-01-30 Thread Paul Sanderson
Thanks All - duplicated means the content is the same as well as the name,
different is the filename is the same but the content is different.

I need to refine my query to produce only one copy of any that is not in
set 0

file10ABCD
file11ABCD
file13EF01
file20BCE2
file22BCE2
file35EE34
file40EE22
file41FF34
file43FF34
file44FF34

My query would return

file13EF01
file35EE34
file41FF34, or file43FF34, or file44FF34

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


Re: [sqlite] Sqlite ubuntu 12.10 compile/install

2013-01-30 Thread David Clark
This has been resolved...solution:
1) use gcc not g++.
2) grab the lastest source from sqlite.org.  There was a version update in 
doing that.  But now it seems good on both
operating systems.  

Thank you,

David Clark



>
> From: Michael Black 
>To: 'David Clark' ; 'General Discussion of SQLite 
>Database'  
>Sent: Wednesday, January 30, 2013 9:30 AM
>Subject: RE: [sqlite] Sqlite ubuntu 12.10 compile/install
> 
>Use the amalgamation:
>
>cc -O -c sqlite3.c
>
>Then link it into your program.  Most of us recommend avoiding shared
>libraries.
>
>If you need special features you may have to set some flags.
>
>
>-Original Message-
>From: sqlite-users-boun...@sqlite.org
>[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of David Clark
>Sent: Wednesday, January 30, 2013 9:06 AM
>To: sqlite-users@sqlite.org
>Subject: [sqlite] Sqlite ubuntu 12.10 compile/install
>
>Ok I have used sqlite in windows software no problems.  
>I am now trying to use it in software I am porting to ubuntu 12.10 and I am
>finding that the source code I used under windows has compile issues.  And
>when I downloaded the .gz file and ran ./configure on that fileset I got
>errors
>on that.  
>
>I know I not being specific on the errors I got.  But my question here is...
>basically under ubuntu what should my procedure be for installing and
>compiling sqlite?  Yes I am new to ubuntu so the obvious is not so obvious 
>on that OS.  
>
>Thank you,
>
>David Clark
>___
>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] Sqlite ubuntu 12.10 compile/install

2013-01-30 Thread David Clark
For the rest of my project I am using the g++ compiler.  But for discussion 
here I ran your statement and got this:
sqlite3.c: In function ‘sqlite3VXPrintf’:
sqlite3.c:19892:39: error: ‘SrcList_item’ undeclared (first use in this 
function)
sqlite3.c:19892:39: note: each undeclared identifier is reported only once for 
each function it appears in
sqlite3.c:19892:53: error: expected expression before ‘)’ token
sqlite3.c: In function ‘unixOpen’:
sqlite3.c:27868:18: error: ‘UnixUnsedFd’ undeclared (first use in this function)
sqlite3.c:27868:31: error: expected expression before ‘)’ token

I get a similar error from g++...as far I can tell in my source code and header 
file.  These two items are undeclared.  

Any ideas?  

Thank you,

David Clark



>
> From: Michael Black 
>To: 'David Clark' ; 'General Discussion of SQLite 
>Database'  
>Sent: Wednesday, January 30, 2013 9:30 AM
>Subject: RE: [sqlite] Sqlite ubuntu 12.10 compile/install
> 
>Use the amalgamation:
>
>cc -O -c sqlite3.c
>
>Then link it into your program.  Most of us recommend avoiding shared
>libraries.
>
>If you need special features you may have to set some flags.
>
>
>-Original Message-
>From: sqlite-users-boun...@sqlite.org
>[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of David Clark
>Sent: Wednesday, January 30, 2013 9:06 AM
>To: sqlite-users@sqlite.org
>Subject: [sqlite] Sqlite ubuntu 12.10 compile/install
>
>Ok I have used sqlite in windows software no problems.  
>I am now trying to use it in software I am porting to ubuntu 12.10 and I am
>finding that the source code I used under windows has compile issues.  And
>when I downloaded the .gz file and ran ./configure on that fileset I got
>errors
>on that.  
>
>I know I not being specific on the errors I got.  But my question here is...
>basically under ubuntu what should my procedure be for installing and
>compiling sqlite?  Yes I am new to ubuntu so the obvious is not so obvious 
>on that OS.  
>
>Thank you,
>
>David Clark
>___
>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] Analyzing and repairing a corrupted database file

2013-01-30 Thread Chris Berardi
I'm using SQLite.net (v1.0.81.0) in an application I'm developing for a
Windows CE system. Recently, one of my database files became corrupted
(but, I don't know how). I'm now trying to examine and possibly repair
the database and I'm experiencing some difficulty.

The main issue I've come across is everything seems to now think that
the database is encrypted (but, it isn't). When I diff'd the database
file with a known good copy (using WinMerge), while the good copy had
easily recognizable strings (e.g., schema), the corrupted copy looked
like pure garbage. What I'd like to determine is whether the database
file is messed up beyond repair, if it can be repaired, and any
indication as to why it happened.

I've tried using the SQLite shell tool issuing the 'pragma
integrity_check', which returned nothing. I then tried to issue a
'.dump' command, which failed after about 2 statements.

I have a copy of SQLite Maestro, but I didn't see any analyze/repair
tools (and it wouldn't open the database file anyway). I also downloaded
a copy of SQLite Manager and SQLite Doctor from SQLabs, which purports
to provide analyzing and repairing tools, but it insists that the
database file is encrypted and wants a password.

Is there a general best praxis for approaching and handling a database
file that has become corrupted? I'm not sure what to try next, or even
if it's already evident that this database file is beyond all hope. Any
suggestions would be appreciated.

Thank you,
Christopher Berardi


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


Re: [sqlite] Sqlite ubuntu 12.10 compile/install

2013-01-30 Thread Michael Black
Use the amalgamation:

cc -O -c sqlite3.c

Then link it into your program.  Most of us recommend avoiding shared
libraries.

If you need special features you may have to set some flags.


-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of David Clark
Sent: Wednesday, January 30, 2013 9:06 AM
To: sqlite-users@sqlite.org
Subject: [sqlite] Sqlite ubuntu 12.10 compile/install

Ok I have used sqlite in windows software no problems.  
I am now trying to use it in software I am porting to ubuntu 12.10 and I am
finding that the source code I used under windows has compile issues.  And
when I downloaded the .gz file and ran ./configure on that fileset I got
errors
on that.  

I know I not being specific on the errors I got.  But my question here is...
basically under ubuntu what should my procedure be for installing and
compiling sqlite?  Yes I am new to ubuntu so the obvious is not so obvious 
on that OS.  

Thank you,

David Clark
___
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 ubuntu 12.10 compile/install

2013-01-30 Thread David Clark
Ok I have used sqlite in windows software no problems.  
I am now trying to use it in software I am porting to ubuntu 12.10 and I am
finding that the source code I used under windows has compile issues.  And
when I downloaded the .gz file and ran ./configure on that fileset I got errors
on that.  

I know I not being specific on the errors I got.  But my question here is...
basically under ubuntu what should my procedure be for installing and
compiling sqlite?  Yes I am new to ubuntu so the obvious is not so obvious 
on that OS.  

Thank you,

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