[sqlite] sqlite3 problems on both 32 and 64 architectures

2004-11-02 Thread Jarosław Staniek
Hallo,
assertions like this (btree.c, line 1043) are bad:
  assert( sizeof(ptr)==sizeof(char*) );
The problem better is described here:
http://bugs.kde.org/show_bug.cgi?id=92563
Reporters say that even for intel P4, sizeof pointers is 8, not 4 there. Any
plans for fixing these bugs in official sqlite release?
--
regards / pozdrawiam,
 Jaroslaw Staniek / OpenOffice Polska
 Developers wanted! Kexi Project: http://www.kexi-project.org
 KDElibs/Windows: http://wiki.kde.org/tiki-index.php?page=KDElibs+for+win32


Re: [sqlite] new uploads

2004-11-02 Thread mike cariotoglou

- Original Message -
From: "Dennis Cote" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 02, 2004 5:25 PM
Subject: Re: [sqlite] new uploads

ok, Denis I have fixed the bug and uploaded the new version of
sqlite3Explorer. thanks for pointing it out.

BTW, I have some comments on your database sample:

1. the bug was triggered by the definition of foreign keys. you use the
syntax:

 create table x(
   device_id integer references Device

it would be more appropriate to do this:

 create table x(
   device_id integer references Device(Device_ID)

this gives more complete information for the schema.

also, I noticed that you use mixed semantics in your column typing:

Integer
Integer(5)
Varchar
varchar(32)

If you plan to use the strong typing of SqliteExplorer, you should be more
consistent, and use :

integer
varchar(32)

what is the meaning of varchar without a size ? did you mean a text blob ?
if so, use the definition CLOB, which will give your
column text affinity, which is something you want in order to avoid
unnecessary attempts to convert to numeric values. true, the "varchar"
definition also gives you TEXT affinity, but, since there IS a "preferred"
type to declare text blobs, (CLOB), why not use it ? Sqlite3Explorer will
recognize it, and give you a multi-line editor to edit/display this field.




[sqlite] column def vs. constraint at end of create table stmt

2004-11-02 Thread j-marvin



hi-

I am working on making my program for viewing sql statement results and
changing table structure a little nicer.  the reason the question came
about below is I thought I'd like to add capability to have more than
one field be the primary key and also would like to add the constraint
unique to work the same.

if I have a column def statement for every field and specify unique and
primary constraints in each column def, what is the reason the
constraint that goes on the very end of the create table would be needed
[, constraint]*  

 column-def ::= name [type] [[CONSTRAINT name] column-constraint]* 

 sql-command ::= CREATE [TEMP | TEMPORARY] TABLE table-name (
column-def [, column-def]*
[, constraint]*
) 

thank you very much,
jim



Re: [sqlite] php: src/auth.c:128: sqliteAuthRead: Assertion `pStack!=0' failed.

2004-11-02 Thread D. Richard Hipp
Per Jessen wrote:
I've now rebuilt a copy from the CVS and I still get the:
php: src/auth.c:128: sqliteAuthRead: Assertion `pStack!=0' failed.
I didn't rebuild the database though - is it needed?
This cannot be the case since in the latest code from
CVS, there is no assert() on line 128, either in version 2.8
or version 3.0.  You must still be using an older version
of the library by mistake.
Please check your work and try again.
--
D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565


[sqlite] php: src/auth.c:128: sqliteAuthRead: Assertion `pStack!=0' failed.

2004-11-02 Thread Per Jessen
D. Richard Hipp wrote:

> Per Jessen wrote:
>> I'm running a small php-script in command-line mode - initially everything
>> goes fine until a table in the db reaches around 8700 rows, then I see the
>> assert failing.
>> 
>> This is 2.8.15, which I'm using with PHP4.3.8/SQLite-1.0.3.  I don't believe
>> I'm doing anything overly complicated - lots of inserts, the occasional
>> update.
>> 
> 
> This is probably the same as ticket #896 which is fixed in the CVS tree.

I've now rebuilt a copy from the CVS and I still get the:

php: src/auth.c:128: sqliteAuthRead: Assertion `pStack!=0' failed.

I didn't rebuild the database though - is it needed?


thanks,
Per

-- 
Per Jessen, Zurich
Let your spam stop here -- http://www.spamchek.com



Re: [sqlite] php: src/auth.c:128: sqliteAuthRead: Assertion `pStack!=0' failed.

2004-11-02 Thread D. Richard Hipp
Per Jessen wrote:
FYI, I tried building from CVS - btree.c doesn't compile with -DNDEBUG. 

We have just begun work on some major enhancements to the library.
So issues like this will come up from time to time in CVSHEAD for the
next couple of months.  You can either fall back to the previous
version or wait a few hours for the problem to be fixed.
The particular issue you describe has already been fixed (just a few
minutes ago) so I think if you do a "cvs update" and try again it might
just work for you.
--
D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565


Re: [sqlite] php: src/auth.c:128: sqliteAuthRead: Assertion `pStack!=0' failed.

2004-11-02 Thread Per Jessen
Per Jessen wrote:

> D. Richard Hipp wrote:
> 
>> This is probably the same as ticket #896 which is fixed in the CVS tree.
>> See:
> 
> FYI, I tried building from CVS - btree.c doesn't compile with -DNDEBUG.
> And when I edited the Makefile.in to remove -DNDEBUG, I ended up with:

Did another checkout, now builds fine.  

Any chance of having eg. a daily CVS snapshot available as download?  I usually
don't bother with a CVS checkout, but the snapshots have been a great help with
apache projects such as xalan and xerces.


-- 
Per Jessen, Zurich
Let your spam stop here -- http://www.spamchek.com



Re: [sqlite] php: src/auth.c:128: sqliteAuthRead: Assertion `pStack!=0' failed.

2004-11-02 Thread Per Jessen
D. Richard Hipp wrote:

> This is probably the same as ticket #896 which is fixed in the CVS tree.
> See:

FYI, I tried building from CVS - btree.c doesn't compile with -DNDEBUG. 
And when I edited the Makefile.in to remove -DNDEBUG, I ended up with:

./libtool --mode=link gcc -g -O2 -DOS_UNIX=1 -DHAVE_USLEEP=1 -I. -I./src 
-DHAVE_READLINE=1 -I/usr/include/readline  \
-o sqlite3 ./src/shell.c libsqlite3.la -lreadline -lreadline
gcc -g -O2 -DOS_UNIX=1 -DHAVE_USLEEP=1 -I. -I./src -DHAVE_READLINE=1 -I/usr
include/readline -o .libs/sqlite3 ./src/shell.c  ./.libs/libsqlite3.so
-lreadline
./.libs/libsqlite3.so: undefined reference to `sqlite3pager_refdump'
collect2: ld returned 1 exit status
make: *** [sqlite3] Error 1



/Per

-- 
Per Jessen, Zurich
Let your spam stop here -- http://www.spamchek.com



Re: [sqlite] Question about UTF8 encoding in SQLite version 2.8.13

2004-11-02 Thread Cory Nelson
Not a whole lot.  For the most part, change sqlite_ to sqlite3_, and
add 16 to the end of funcs you want in unicode.

Have you tried using setlocale() to use a swedish codepage?


On Tue, 02 Nov 2004 16:54:40 +, Liz Steel <[EMAIL PROTECTED]> wrote:
> Thanks for your reply, however, wcstombs uses the default code page rather
> that UTF8, which is where I was going wrong with using it originally.
> 
> Unfortunately, it is unlikely that I will get approval to use libiconv as it
> is third-party software.
> 
> How much effort is involved with converting to SQLite 3.x? I'm not sure if I
> can get approval to use that either, but if that's the only way I'm going to
> get it to work, then I may have to do it.
> 
> Liz.
> 
> Original Message Follows
> From: Cory Nelson <[EMAIL PROTECTED]>
> Reply-To: Cory Nelson <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: [sqlite] Question about UTF8 encoding in SQLite version 2.8.13
> Date: Tue, 2 Nov 2004 08:41:25 -0800
> 
> 
> 
> Well, wcstombs uses WideCharToMultiByte() internally, with some more
> locality checks added in.  Maybe you are using it wrong?
> 
> If you cant get that to work, libiconv is great for converting charsets.
> 
> Is there any reason you can't use sqlite 3.x?  It has native unicode
> support.
> 
> On Tue, 02 Nov 2004 15:50:59 +, Liz Steel <[EMAIL PROTECTED]> wrote:
> > Hello - I hope somebody can help me!
> >
> > I am using SQLite version 2.8.13 as a DLL with a windows C++ application.
> I
> > have the SQLITE_UTF8 macro defined.
> >
> > I have no problems adding and retrieving strings to and from the database
> -
> > I am using WideCharToMultiByte and MultiByteToWideChar to convert from
> > CString (Wide) to char * (Multibyte).
> >
> > (Previously I was using wcstombs and mbstowcs to convert, but this
> doesn't
> > support Greek and Russian characters, and I don't think it was actually
> > converting the strings properly.)
> >
> > However, when I call sqlite_open with a multibyte string, it doesn't seem
> to
> > work as I expect.
> >
> > To clarify: I have a database name with Swedish characters in, which are
> > converted to multibyte characters, however, the filename that is created
> > treats each of the characters separately, which then causes problems
> later.
> > As an example, the string "Ãândrad" is converted to "ÃÆÃâÅndrad".
> 
> 
> >
> > If I use wcstombs to convert the filename string, this works OK for
> Swedish
> > characters, but then doesn't work for Greek characters.
> >
> > Does anyone have any ideas?
> >
> > Thanks,
> >
> > Liz.
> >
> > _
> > Use MSN Messenger to send music and pics to your friends
> > http://www.msn.co.uk/messenger
> >
> >
> 
> --
> Cory Nelson
> http://www.int64.org
> 
> _
> Stay in touch with absent friends - get MSN Messenger 
> 
> 
> http://www.msn.co.uk/messenger
> 
> 


-- 
Cory Nelson
http://www.int64.org


Re: [sqlite][adodotnetsqlite] Writing an in-memory database to file

2004-11-02 Thread D. Richard Hipp
Didier BRETIN wrote:
  Cmd.CommandText = "ATTACH DATABASE database AS main";
   
The original memory database is called "main".  Choose
a different name.
--
D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565


Re: [sqlite] new uploads

2004-11-02 Thread D. Richard Hipp
Dennis Cote wrote:
I think there is a problem with the SQLite web site. The contrib link
(http://www.hwaci.com/sw/sqlite/contrib) on the main page is giving me a
file not found error from Hurricane Electric.
Please use http://www.sqlite.org/contrib instead.  That particular
link should not be mirrored on www.hwaci.com.  I'll investigate and
fix the problem.

--
D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565


Re: [sqlite] Question about UTF8 encoding in SQLite version 2.8.13

2004-11-02 Thread Liz Steel
Thanks for your reply, however, wcstombs uses the default code page rather 
that UTF8, which is where I was going wrong with using it originally.

Unfortunately, it is unlikely that I will get approval to use libiconv as it 
is third-party software.

How much effort is involved with converting to SQLite 3.x? I'm not sure if I 
can get approval to use that either, but if that's the only way I'm going to 
get it to work, then I may have to do it.

Liz.
Original Message Follows
From: Cory Nelson <[EMAIL PROTECTED]>
Reply-To: Cory Nelson <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: [sqlite] Question about UTF8 encoding in SQLite version 2.8.13
Date: Tue, 2 Nov 2004 08:41:25 -0800
Well, wcstombs uses WideCharToMultiByte() internally, with some more
locality checks added in.  Maybe you are using it wrong?
If you cant get that to work, libiconv is great for converting charsets.
Is there any reason you can't use sqlite 3.x?  It has native unicode 
support.

On Tue, 02 Nov 2004 15:50:59 +, Liz Steel <[EMAIL PROTECTED]> wrote:
> Hello - I hope somebody can help me!
>
> I am using SQLite version 2.8.13 as a DLL with a windows C++ application. 
I
> have the SQLITE_UTF8 macro defined.
>
> I have no problems adding and retrieving strings to and from the database 
-
> I am using WideCharToMultiByte and MultiByteToWideChar to convert from
> CString (Wide) to char * (Multibyte).
>
> (Previously I was using wcstombs and mbstowcs to convert, but this 
doesn't
> support Greek and Russian characters, and I don't think it was actually
> converting the strings properly.)
>
> However, when I call sqlite_open with a multibyte string, it doesn't seem 
to
> work as I expect.
>
> To clarify: I have a database name with Swedish characters in, which are
> converted to multibyte characters, however, the filename that is created
> treats each of the characters separately, which then causes problems 
later.
> As an example, the string "Ändrad" is converted to "Ändrad".
>
> If I use wcstombs to convert the filename string, this works OK for 
Swedish
> characters, but then doesn't work for Greek characters.
>
> Does anyone have any ideas?
>
> Thanks,
>
> Liz.
>
> _
> Use MSN Messenger to send music and pics to your friends
> http://www.msn.co.uk/messenger
>
>

--
Cory Nelson
http://www.int64.org
_
Stay in touch with absent friends - get MSN Messenger 
http://www.msn.co.uk/messenger



Re: [sqlite] Question about UTF8 encoding in SQLite version 2.8.13

2004-11-02 Thread Cory Nelson
Well, wcstombs uses WideCharToMultiByte() internally, with some more
locality checks added in.  Maybe you are using it wrong?

If you cant get that to work, libiconv is great for converting charsets.

Is there any reason you can't use sqlite 3.x?  It has native unicode support.


On Tue, 02 Nov 2004 15:50:59 +, Liz Steel <[EMAIL PROTECTED]> wrote:
> Hello - I hope somebody can help me!
> 
> I am using SQLite version 2.8.13 as a DLL with a windows C++ application. I
> have the SQLITE_UTF8 macro defined.
> 
> I have no problems adding and retrieving strings to and from the database -
> I am using WideCharToMultiByte and MultiByteToWideChar to convert from
> CString (Wide) to char * (Multibyte).
> 
> (Previously I was using wcstombs and mbstowcs to convert, but this doesn't
> support Greek and Russian characters, and I don't think it was actually
> converting the strings properly.)
> 
> However, when I call sqlite_open with a multibyte string, it doesn't seem to
> work as I expect.
> 
> To clarify: I have a database name with Swedish characters in, which are
> converted to multibyte characters, however, the filename that is created
> treats each of the characters separately, which then causes problems later.
> As an example, the string "Ãndrad" is converted to "Ãândrad".
> 
> If I use wcstombs to convert the filename string, this works OK for Swedish
> characters, but then doesn't work for Greek characters.
> 
> Does anyone have any ideas?
> 
> Thanks,
> 
> Liz.
> 
> _
> Use MSN Messenger to send music and pics to your friends
> http://www.msn.co.uk/messenger
> 
> 


-- 
Cory Nelson
http://www.int64.org


Re: [sqlite] Question about UTF8 encoding in SQLite version 2.8.13

2004-11-02 Thread Christian Smith
On Tue, 2 Nov 2004, Liz Steel wrote:

>However, when I call sqlite_open with a multibyte string, it doesn't seem to
>work as I expect.
>
>To clarify: I have a database name with Swedish characters in, which are
>converted to multibyte characters, however, the filename that is created
>treats each of the characters separately, which then causes problems later.
>As an example, the string "Ändrad" is converted to "Ändrad".
>
>If I use wcstombs to convert the filename string, this works OK for Swedish
>characters, but then doesn't work for Greek characters.
>
>Does anyone have any ideas?


The code to parse filenames is not UTF8 aware, and so will cause problems
when splitting a filename into directory and filename components if the
string is a UTF8 string. The offending function appears to be
sqlitepager_open in pager.c, which steps backwards through the path name a
character at a time looking the directory seperator character, which will
obviously be tripped up by a multi-byte character.

You should probably avoid using UTF8 for filenames, or raise a bug if you
really need UTF8 filenames.


>
>Thanks,
>
>Liz.
>

Christian

-- 
/"\
\ /ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
 X   - AGAINST MS ATTACHMENTS
/ \


Re: [sqlite] Crypt the database file

2004-11-02 Thread Ng Pheng Siong
On Tue, Nov 02, 2004 at 01:58:42PM +0100, Didier BRETIN wrote:
> I'm new to SQLite, and I try to know if it is possible to crypt de 
> database file used by
> SQLite. I try to find some documentation on this but I found nothing :(.

http://www.sqlcrypt.com

Currently in beta testing. Signups are still available.

Cheers.

-- 
Ng Pheng Siong <[EMAIL PROTECTED]> 

http://sandbox.rulemaker.net/ngps -+- M2Crypto, ZServerSSL for Zope, Blog
http://www.sqlcrypt.com   -+- AES Encryption for SQLite


Re: [sqlite] new uploads

2004-11-02 Thread Massimiliano
Dennis Cote wrote:
Richard,
I think there is a problem with the SQLite web site. The contrib link
(http://www.hwaci.com/sw/sqlite/contrib) on the main page is giving me a
file not found error from Hurricane Electric.
 

may is that the link you're looking for:
http://www.sqlite.org/contrib
Ciao
Massimiliano


Re: [sqlite] help with ADO.NET Data Provider for SQLite from Finisar

2004-11-02 Thread Didier BRETIN
Hi Giuliano,
ISA Informatica a écrit :
Hello,
I downloaded the
ADO.NET Data Provider for SQLite from Finisar
http://sourceforge.net/projects/adodotnetsqlite
but when i start the project i receive always the error message that 
a reference is missing... NUnit... 

I added the reference, but still cannot run the .NET
provider.
can someone please help me? how can i do to try
the .NET  SQLite?
 

=> Have you tried the tutorial ? 
http://sourceforge.net/docman/?group_id=94056

=> And don't forget to add the sqlite.dll in your exe directory
as said here : 
http://sourceforge.net/forum/forum.php?thread_id=1167634_id=325526

Regards.
--
Didier BRETIN
INFORMACTIS
http://www.informactis.com/
tél : 04 72 69 52 00


Re: [sqlite][adodotnetsqlite] Writing an in-memory database to file

2004-11-02 Thread Didier BRETIN
Hi,
D. Richard Hipp wrote :
Gerhard Haering wrote:
On Tue, Nov 02, 2004 at 12:37:23PM +0100, Oliver Bienert wrote:
Hello all,
I wonder if there is a possibility to save (dump) an in-memory
database to file (and vice versa, loading from file) in a fast way?
(Without having to create a new database and copying records by
select and inserts)

There is none. Did you actually try INSERT ... SELECT and found the
performance inadequate?
Use ATTACH to attach the file database to your in-memory
database.  Then do a
   INSERT INTO file.table1 SELECT * FROM main.table1;
for each table.
I try to do this in a little test in C#; here is my code :

   SQLiteConnection Conn = new SQLiteConnection();
   Conn.ConnectionString = "Data 
Source=:memory:;New=True;Compress=True;Synchronous=Off";
   Conn.Open();
   SQLiteCommand Cmd = new SQLiteCommand();
   Cmd = Conn.CreateCommand();
   Cmd.CommandText = "CREATE table mp3Lst (mp3Id integer 
primary key, mp3File varchar(100))";
   Cmd.ExecuteNonQuery();

   SQLiteTransaction Transact;
   ArrayList alMp3Lst = new ArrayList();
   alMp3Lst.Add("1.mp3");
   alMp3Lst.Add("2.mp3");
   alMp3Lst.Add("3mp3");
   alMp3Lst.Add("4.mp3");
   alMp3Lst.Add("5.mp3");
   Transact = (SQLiteTransaction) Conn.BeginTransaction();
   foreach (string mp3File in alMp3Lst)
   {
   Cmd.CommandText = String.Format("INSERT INTO mp3Lst 
(mp3File) VALUES ('{0}')", mp3File);
   Cmd.ExecuteNonQuery();
   }

   Transact.Commit();
   Cmd.CommandText = "ATTACH DATABASE database AS main";
   Cmd.ExecuteNonQuery();
   Cmd.CommandText = "INSERT INTO database.mp3Lst SELECT * FROM 
main.mp3Lst";
   Cmd.ExecuteNonQuery();


As you can see, it's quite simple :).
I have an error after doing the ATTACH DATABASE, which is :

SQL logic error or missing database:  database main is already in use

=> I'm new to sqlite so perharps I do a mistake in the ATTACH DATABASE 
method ?

Regards.
--
Didier BRETIN
INFORMACTIS
http://www.informactis.com/
tél : 04 72 69 52 00


Re: [sqlite] Join function in select statement

2004-11-02 Thread Dan Keeley

Loading shared libraries is easy enough on windows and
Linux, but throw AIX and HPUX and Solaris into the mix
and suddenly things become more complicated.  SQLite is
a cross-platform library.  It has to work on more than
just windows.
Really? Both these platforms support shared libraries - I use the 
functionality on each every day!

Why therefore is it such a problem for SQLite?
Dan



Re: [sqlite] new uploads

2004-11-02 Thread Dennis Cote
CARIOTOGLOU MIKE wrote:
> I have uploaded the new version of sqlite3Explorer, which fixes a bug
> with the schema treeview.

Richard,

I think there is a problem with the SQLite web site. The contrib link
(http://www.hwaci.com/sw/sqlite/contrib) on the main page is giving me a
file not found error from Hurricane Electric.


RE: [sqlite] Join function in select statement

2004-11-02 Thread CARIOTOGLOU MIKE


> -Original Message-
> From: D. Richard Hipp [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 02, 2004 4:49 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [sqlite] Join function in select statement
> 
> 
> CARIOTOGLOU MIKE wrote:
> > Why not provide some extra functionality on one platform ? 
> > 
> 
> Because that's not what SQLite does.  SQLite works the same
> on all platforms.
> 
> Note also that were this policy to change and SQLite were
> allowed to have extra features on selected platforms, it is
> most likely that Unix would get the extra features and windows
> users would be left to fend for themselves, not the other way
> around.
> -- 
> D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565

ok, point taken! I will not argue about this or any similar matter again :)
:)
 



Re: [sqlite] Join function in select statement

2004-11-02 Thread D. Richard Hipp
CARIOTOGLOU MIKE wrote:
Why not provide some extra functionality on one platform ? 

Because that's not what SQLite does.  SQLite works the same
on all platforms.
Note also that were this policy to change and SQLite were
allowed to have extra features on selected platforms, it is
most likely that Unix would get the extra features and windows
users would be left to fend for themselves, not the other way
around.
--
D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565


Re: [sqlite] Join function in select statement

2004-11-02 Thread Gerhard Haering
On Tue, Nov 02, 2004 at 04:36:41PM +0200, CARIOTOGLOU MIKE wrote:
> [user-defined functions loadable through shared libraries]
> true. OTOH, since, as you say, it *is* simple, why not provide some extra
> functionality on one platform ? it does not affect other platforms, and it
> is s nice to have.. it would be an IFDEF thingy, anyway.. of course, you
> know best.

Why don't you just distribute a patched SQLite shared library if you
use user-defined functions in your own applications, but want other
applications to use these functions, too.

That's the only use-case anyway, isn't it?

-- Gerhard
-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?


signature.asc
Description: Digital signature


RE: [sqlite] Join function in select statement

2004-11-02 Thread CARIOTOGLOU MIKE
true. OTOH, since, as you say, it *is* simple, why not provide some extra
functionality on one platform ? it does not affect other platforms, and it
is s nice to have.. it would be an IFDEF thingy, anyway.. of course, you
know best.

> -Original Message-
> From: D. Richard Hipp [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 02, 2004 3:44 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [sqlite] Join function in select statement
> 
> 
> CARIOTOGLOU MIKE wrote:
> > write a user-defined function in your hosting code. the 
> only problem is,
> > people that use your database (as opposed to your code), 
> will not be able to
> > use the function. DRH, what about DLL-loadable functions ? 
> this should be
> > easy to arrange, and would be of enormous help.
> > example :
> > 
> > pragma load_Functions "c:\myfuncs.dll"
> > 
> 
> Loading shared libraries is easy enough on windows and
> Linux, but throw AIX and HPUX and Solaris into the mix
> and suddenly things become more complicated.  SQLite is
> a cross-platform library.  It has to work on more than
> just windows.
> 
> 
> -- 
> D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565
> 



Re: [sqlite] Anyone knows any sqlite based bullettin board ?

2004-11-02 Thread DJ Anubis
Le mardi 2 Novembre 2004 09:36, George Ionescu a ÃcritÂ:

> I'm looking for an sqlite-based bulletin board to run under linux.
> Any recommendations?

All PHP CMS, forum and boards using adodb php class can use sqlite.
Google with sqlite cms 

-- 
JCR
aka DJ Anubis
LAB Project Initiator & coordinator


Re: [sqlite] Join function in select statement

2004-11-02 Thread D. Richard Hipp
CARIOTOGLOU MIKE wrote:
write a user-defined function in your hosting code. the only problem is,
people that use your database (as opposed to your code), will not be able to
use the function. DRH, what about DLL-loadable functions ? this should be
easy to arrange, and would be of enormous help.
example :
pragma load_Functions "c:\myfuncs.dll"
Loading shared libraries is easy enough on windows and
Linux, but throw AIX and HPUX and Solaris into the mix
and suddenly things become more complicated.  SQLite is
a cross-platform library.  It has to work on more than
just windows.
--
D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565


Re: [sqlite] Writing an in-memory database to file

2004-11-02 Thread D. Richard Hipp
Gerhard Haering wrote:
On Tue, Nov 02, 2004 at 12:37:23PM +0100, Oliver Bienert wrote:
Hello all,
I wonder if there is a possibility to save (dump) an in-memory
database to file (and vice versa, loading from file) in a fast way?
(Without having to create a new database and copying records by
select and inserts)

There is none. Did you actually try INSERT ... SELECT and found the
performance inadequate?
Use ATTACH to attach the file database to your in-memory
database.  Then do a
   INSERT INTO file.table1 SELECT * FROM main.table1;
for each table.
--
D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565


Re: [sqlite] Crypt the database file

2004-11-02 Thread Tito Ciuro
Hello Didier,
Check: http://www.hwaci.com/sw/sqlite/prosupport.html
The second paragraph in particular...
Regards,
-- Tito
On Nov 2, 2004, at 13:58, Didier BRETIN wrote:
Hello,
I'm new to SQLite, and I try to know if it is possible to crypt de 
database file used by
SQLite. I try to find some documentation on this but I found nothing 
:(.

Is it possible ?
I would like to use SQLite for my application but if the database file 
can be read
by every body it's a bad solution for me :(.

Regards.
--
Didier BRETIN
INFORMACTIS
http://www.informactis.com/
tél : 04 72 69 52 00



[sqlite] Crypt the database file

2004-11-02 Thread Didier BRETIN
Hello,
I'm new to SQLite, and I try to know if it is possible to crypt de 
database file used by
SQLite. I try to find some documentation on this but I found nothing :(.

Is it possible ?
I would like to use SQLite for my application but if the database file 
can be read
by every body it's a bad solution for me :(.

Regards.
--
Didier BRETIN
INFORMACTIS
http://www.informactis.com/
tél : 04 72 69 52 00


Re: [sqlite] Writing an in-memory database to file

2004-11-02 Thread Gerhard Haering
On Tue, Nov 02, 2004 at 12:37:23PM +0100, Oliver Bienert wrote:
> Hello all,
> 
> I wonder if there is a possibility to save (dump) an in-memory
> database to file (and vice versa, loading from file) in a fast way?
> (Without having to create a new database and copying records by
> select and inserts)

There is none. Did you actually try INSERT ... SELECT and found the
performance inadequate?

-- Gerhard
-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?


signature.asc
Description: Digital signature


[sqlite] Writing an in-memory database to file

2004-11-02 Thread Oliver Bienert
Hello all,
I wonder if there is a possibility to save (dump) an in-memory database 
to file (and vice versa, loading from file) in a fast way? (Without 
having to create a new database and copying records by select and inserts)

Oliver


[sqlite] new uploads

2004-11-02 Thread CARIOTOGLOU MIKE
I have uploaded the new version of sqlite3Explorer, which fixes a bug with
the schema treeview.



Re: [sqlite] Join function in select statement

2004-11-02 Thread Eric Bohlman
Marcel Strittmatter wrote:
Hi all
I like to have a join function that I can use in a select statement like 
this:

select join(name, ',') from people;
this should produce something like this:
scott,martin,jones,adams
It is not possible to use perl or another script language. The only 
language I can use is C/C++. Is there a way to create such a function 
outside of sqlite, or do I have to extend the sqlite library?
You ought to be able to do it with a user-defined function (I'd call it 
something other than "join," though, for sanity reasons).


RE: [sqlite] new uploads

2004-11-02 Thread CARIOTOGLOU MIKE
I believe I know what is wrong, it has to do with tables that have implicit
indexes. I will upload a new version in an hour. pls give it a try, and let
me know. if it does not work,
send me your database (zipped).

regards.

> -Original Message-
> From: Dennis Cote [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 02, 2004 1:08 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [sqlite] new uploads
> 
> 
> mike cariotoglou wrote:
> > I have uploaded the current version of sqlite3Explorer (a GUI to
> > manage sqlite3 databases) to http://www.sqlite.org/contrib. also, I
> 
> Hi Mike,
> 
> I was trying to use your sqlite3Explorer program to look at 
> my database, but
> it won't open it. I get a dialog with the following error when I use
> File/Open Database...
> 
> ---
> sqlite3explorer
> ---
> Could not convert variant of type (Null) into type (String)
> ---
> OK
> ---
> 
> After this I am left with schema tree with only one table, 
> the first one
> listed by the .schema command in sqlite3.exe. Using 
> sqlite3.exe to dump the
> database shows all the tables actually exist (ther are 38) as 
> well as their
> associated indexes and triggers.
> 
> I'm using sqlite3.dll version 3.08 built from CVS source, and 
> the version of
> sqlite3Explorer on the SQLite website.
> 
> Any ideas?
> 
> If you want I can send you a copy of the problematic database file.
> 
> P.S. A little further digging shows that it is reading the 
> database, only
> the schema tree view is not working. I can see all the tables with
> reasonable counts using the View/Show Tables with Counts 
> command. Without
> the schema tree view working, I can't seem to display the contents of
> anything other than the master table, and this first table 
> (which is empty).
> 



[sqlite] Anyone knows any sqlite based bullettin board ?

2004-11-02 Thread George Ionescu
Hello Dr. Hipp,
hello sqlite users,

I'm looking for an sqlite-based bulletin board to run under linux. Any recommendations?

Thanks.

Regards,
George Ionescu