Re: [sqlite] How to add a column with CURRENT_DATETIME?

2008-05-28 Thread Dennis Cote
-bin/mailman/listinfo/sqlite-users > You need to use CURRENT_TIMESTAMP as shown at http://www.sqlite.org/lang_createtable.html HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] last_insert_rowid reproducible bug with triggers and FTS2 and 3

2008-05-22 Thread Dennis Cote
ct unless the lastrowid and nchanges values are saved and restored around the xCommit calls that happen when the active transaction ends. Would that be a possible solution? Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Bind arguments for insert and not null columns with default values

2008-05-22 Thread Dennis Cote
have lots of fields that you want to do this with the required number of combinations can get large very quickly, so you may be better off building the statements on the fly. HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] last_insert_rowid reproducible bug with triggers and FTS2 and 3

2008-05-22 Thread Dennis Cote
Richard and Scott may have misread this one a little bit. It seems to me that all the operations Bram has done are using the normal (i.e. non-virtual table) table, one. All the accesses of the virtual table search are done inside the trigger routines. SQLite is supposed to be sa

Re: [sqlite] do someone know? DotGnu

2008-05-22 Thread Dennis Cote
rivers at http://www.sqlite.org/cvstrac/wiki?p=SqliteOdbc which may work for you as well. HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] baffling performance decrease across network (specific case)

2008-05-22 Thread Dennis Cote
this and subsequently slows down to the real speed of remote file access. See http://en.wikipedia.org/wiki/Opportunistic_Locking for additional info. HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLITE_ENABLE_FTS3

2008-05-22 Thread Dennis Cote
compiler command line by adding this option to the command -DSQLITE_ENABLE_FTS3 Or you can add the definition to your IDE's project options file. I'm not sure how to do this with VS 2005, but you can probably find it in the help for additional compiler definitions. HTH Dennis Cote

Re: [sqlite] Equivalent of mysql_real_escape_string() ?

2008-05-22 Thread Dennis Cote
better approach, there is a partial answer to your question. SQLite provides the sqlite3_mprintf() function and it's associated %q and %Q format specifiers for quoting SQL strings. See http://www.sqlite.org/c3ref/mprintf.html for details. I'm not sure if this functionality is ex

Re: [sqlite] FTS3 Question

2008-05-22 Thread Dennis Cote
lready exists, and is included in SQLite. It is called group_concat(). See http://www.sqlite.org/lang_aggfunc.html for details. SELECT guid FROM data WHERE text MATCH (SELECT group_concat(query, ' OR ') FROM category); HTH Dennis Cote ___ sqlite-u

Re: [sqlite] Limitation of sqlite3_last_insert_rowid()

2008-05-22 Thread Dennis Cote
lue with no mutual exclusion provided by SQLite. You can of course use your own mutex to control access to this variable (through the API function), to allow your threads to read the value reliably after an insert. Or you could simply have each thread use a separate connection

Re: [sqlite] interrupting sqlite3_prepare_v2

2008-05-22 Thread Dennis Cote
ase do so if you have the time. If you locate a bug it will help all users of SQLite. Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Help!!! sqlite 3.5.8 crash: access violation

2008-05-22 Thread Dennis Cote
[EMAIL PROTECTED] wrote: > The attachment size limitation of the bug report is 100k :( I'm sorry about the late follow up, but I have been away for a while. Can you contact me off list to see about transferring the compressed database so I can use it to look into the problem? Dennis C

Re: [sqlite] Help!!! sqlite 3.5.8 crash: access violation

2008-05-15 Thread Dennis Cote
You are correct, it should not crash. That's why it is important to get a copy of the database that is causing the problem so that it can be used to find the bug. Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/

Re: [sqlite] Help!!! sqlite 3.5.8 crash: access violation

2008-05-15 Thread Dennis Cote
ane Long null, Primary Key (CarID) ); SQLite does accept the table definition as you have it written without any error messages, but it does not agree with the documentation. So there is either an error in the documentation or in the parser. You ma

Re: [sqlite] SQLite version 3.5.9

2008-05-14 Thread Dennis Cote
d try benchmark tests with page sizes of 8K and 32K to see if there is a substantial difference. HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Help!!! sqlite 3.5.8 crash: access violation

2008-05-14 Thread Dennis Cote
//en.wikipedia.org/wiki/Thread_hijacking What is the schema of Carimages table? Can you provide a couple of sample records instead of the entire database? Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] sorting records in random order

2008-05-08 Thread Dennis Cote
f a table then you may be able to use some of these ideas to speed things up. HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] sorting records in random order

2008-05-07 Thread Dennis Cote
0 2 0 t 00 29Goto 0 3 000 sqlite> Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] database always locked

2008-05-05 Thread Dennis Cote
ment (but it should not cause a problem either). HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] property/config file for SQLite

2008-05-02 Thread Dennis Cote
[EMAIL PROTECTED] wrote: > Is there a way to configure SQLite using a property/config file? > Is changing the source code the only way to affect how it behaves? > It would probably be better if you were a little more specific. What part of its behavior do you want to change? De

Re: [sqlite] make import not abort

2008-04-30 Thread Dennis Cote
y existing records in t_real you could use an insert or replace instead. insert or replace into t_real select * from t_temp; HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] how is sqlitedll-3.5.8.zip built?

2008-04-30 Thread Dennis Cote
. Is that correct? If so, what options are defined when it is being built? If not, how is it built? TIA Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Recommended (Windows/Linux) SQLite utilities

2008-04-30 Thread Dennis Cote
nager add-on for Firefox at https://addons.mozilla.org/en-US/firefox/addon/5817. It seems to work quite well in my testing. Its nice to have the same interface on multiple platforms if you switch back and forth often. HTH Dennis Cote ___ sqlite-users mai

Re: [sqlite] One connection with 2 statement handle.

2008-04-28 Thread Dennis Cote
Joanne Pham wrote: > So one connection is used by two multiple statements concurrently one for > insertion and one for selection. Is that ok. > Yes, that's fine. HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://s

Re: [sqlite] View bindings for a statement

2008-04-25 Thread Dennis Cote
lect like this select ?1, ?2, ?3 and then transfer the bindings from the first select to the second. When you run the second query it will return the values you bound to the first query before calling sqlite3_transfer_bindings(). HTH Dennis Cote _

Re: [sqlite] Performance statistics?

2008-04-25 Thread Dennis Cote
ex) measures the execution time of each SQL statement to help you optimize your SQL. Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] How to execute the statment file using sqlite API

2008-04-24 Thread Dennis Cote
y, so they cannot be used by your application. If you are using the sqlite3 shell, you can use the .read command to execute all the commands in a file. sqlite>.read getData.sql HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.or

Re: [sqlite] Blob truncation

2008-04-24 Thread Dennis Cote
ange the size by replacing one blob with another one of a different size. > Is it possible to store the file in a bigger > blob and then replace the blob with smaller one without to copy the raw blob > data? > No, when you replace a blob you will need to copy the data into th

Re: [sqlite] Blob truncation

2008-04-23 Thread Dennis Cote
then set the size of the blob correctly before you start writing to it. HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Update in one process and Select in another (dumb question??)

2008-04-21 Thread Dennis Cote
t that doesn't seem to > work either. > If you post the code you are using to read and write the database someone will be able to help you straighten this out. Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLITE_OMIT_xxx

2008-04-21 Thread Dennis Cote
MIT_yyy ... > > Is this correct? > I believe so, but I haven't ever used the OMIT options when building SQLite. Are you having a problem when you do this? Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] multiple writers for in-memory datastore

2008-04-20 Thread Dennis Cote
James Gregurich wrote: > I think I will go with CoreData on MacOSX and figure out something > else to do on Windows later. > > > You do know that CoreData uses SQLite for its persistant storage. Dennis Cote ___ sqlite-users mail

Re: [sqlite] cidr data type

2008-04-20 Thread Dennis Cote
turn the host address within the network which can't be used to test if the original IP address is within a particular network. > Again, that only works for v4. > It was only intended to work for IPv4 as shown in the OP. Dennis Cote ___ sqli

Re: [sqlite] cidr data type

2008-04-20 Thread Dennis Cote
in other languages. This was intended to work for IPv4 addresses only as shown in the OP example. For these addresses the practical range of network width is from 2, not really very practical, but a legal minimum subnet width, to 25, the entire range of a class A network. De

Re: [sqlite] logging statements executed by the db

2008-04-18 Thread Dennis Cote
he application if it write back to the table. > I believe a while back, IIRC, someone (perhaps Richard himself) had > posted a way to log every action on a db in a table for posterity. I > can't find that right now, but that could work for me. > The undo/redo code at http://www.sqlite.org/

Re: [sqlite] logging statements executed by the db

2008-04-18 Thread Dennis Cote
ecuted. Your callback can log this to a file. See http://www.sqlite.org/c3ref/profile.html for more info. One drawback of this technique is that you don't get to see the values of any bound parameters. HTH Dennis Cote ___ sqlite-users mailing list sqlite-user

Re: [sqlite] multiple writers for in-memory datastore

2008-04-18 Thread Dennis Cote
nd passes the results back to, your other threads as John suggested. You will have to provide some form of resource management for the shared resource, whether it is a shared memory database, file, or something else. HTH Dennis Cote ___ sqlite-users

Re: [sqlite] multiple writers for in-memory datastore

2008-04-18 Thread Dennis Cote
ile will be locked, so readers will have to wait. Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] multiple writers for in-memory datastore

2008-04-18 Thread Dennis Cote
course, but it seems like a lot of work for little return when there are other ways to do what you want. HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] when we need to use sqlidte3_close

2008-04-18 Thread Dennis Cote
ection. sqlite3_finalize() destroys a statement created by sqlite3_prepare(). You do not close these statements. HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] multiple writers for in-memory datastore

2008-04-18 Thread Dennis Cote
manage the locking for you. HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] sqlite3_changes question

2008-04-18 Thread Dennis Cote
to? I believe it is the same as a normal begin. Locking is deferred until it is required to allow maximum read concurrency. HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] sqlite3_changes question

2008-04-18 Thread Dennis Cote
t; from the UPDATE to get my count? > I don't know for sure, but I suspect it would be the same. It seems like it should be simple enough to try it out both ways. Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.or

Re: [sqlite] selecting uncommited rows

2008-04-17 Thread Dennis Cote
change_log); Dennis sqlite> select * from t1; Alex Dennis sqlite> Try it before you decide it won't work. Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] explain query plan?

2008-04-17 Thread Dennis Cote
verview.html for some more info. There is a slide show from a presentation that Richard gave which explains how SQLite execute joins as nested for loops, but I can't find it now. HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] selecting uncommited rows

2008-04-17 Thread Dennis Cote
begin; insert into t1 values ('Dennis'); select * from t1 where rowid in (select id from change_log); Now either commit or rollback to end your transaction. Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org

Re: [sqlite] how to select uncomitted rows?

2008-04-17 Thread Dennis Cote
Alex Katebi wrote: > But triggers don't trigger until commit. > That is not true. Trigger code executes inline with the statement that caused the trigger to fire. Try a few triggers with the command line shell to convince yourself. Denni

Re: [sqlite] selecting uncommited rows

2008-04-17 Thread Dennis Cote
ds stored in the change_log table. If you want to get fancier you can look at this page for more ideas http://www.sqlite.org/cvstrac/wiki?p=UndoRedo HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman

Re: [sqlite] OUTER JOIN and PRIMARY KEY in 3.5.8

2008-04-17 Thread Dennis Cote
in condition. In the OP's query SQLite is failing to use an index on the right table when it should. Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] OUTER JOIN and PRIMARY KEY in 3.5.8

2008-04-17 Thread Dennis Cote
Eric Minbiole wrote: > > However, I wanted to let others take a look, to see if the > issue was with my query (quite possible), or with the new version. > This is definitely an issue with the new version. It is doing a nested table scan instead of using the index for the left j

Re: [sqlite] Where To Put SQLite3.exe or SQLite3.dll for Windows Version of PHP?

2008-04-17 Thread Dennis Cote
SQLite 3.5.8 module(s) there, then edit > my path variable to point to it? > I put both files in my C:\Windows\System32 directory. It is already on the path so you can run sqlite3.exe, and sqlite3.dll will be available to any program that links to the dll but doesn't supply a local copy

Re: [sqlite] integer primary key and unique index?

2008-04-15 Thread Dennis Cote
Petite Abeille wrote: > > Would adding an unique index on an integer primary key be of any > benefit? Or is it redundant? > It would not help, and would in fact slow down all inserts, deletes, and updates for no benefit. It is redundant. HTH

Re: [sqlite] Comparison of SQLite applications for Mac

2008-04-14 Thread Dennis Cote
hat works on Mac OS as well. Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite>=3.5.6 does not open database file

2008-04-14 Thread Dennis Cote
ow large is a zipped (or better yet a 7z compressed) copy of the problematic database file? Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Implicit INDEX?

2008-04-14 Thread Dennis Cote
lows it to use the columns stored in the index to supply the results of a query without looking at the main table. In effect this index becomes your main table because it stores all the data. HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Dealing with monetary huge values in sqlite

2008-04-13 Thread Dennis Cote
, but I agree with this suggestion. Two hands working can do more than a thousand clasped in prayer This is one of the best things I have read in a long time. Dennis Cote __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam

Re: [sqlite] List Columns

2008-04-11 Thread Dennis Cote
info(table-name) at http://www.sqlite.org/pragma.html#schema HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] error in sqlite3_extension_init

2008-04-11 Thread Dennis Cote
3_api_rountines ^ Note the extra character! Guess which one you were using. I looked at this for way too long, even after Dan had pointed it out. HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/

Re: [sqlite] schema design question

2008-04-11 Thread Dennis Cote
rieve the secondary fields using the id obtained from the primary field. select * from primary; if (has_secondary()) select * from secondary where id = primary.id; This does not waste any space storing unnecessary null fields. You should only resort the more complex foreign keys whe

Re: [sqlite] Sqlite question---->how to impose order on query result for paging

2008-04-10 Thread Dennis Cote
SQLite. HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] [noob] merge statement equivalent?

2008-04-10 Thread Dennis Cote
owid)) ... where rowid in (select row1 from matches); drop table matches; HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Documentation for the register based VM?

2008-04-10 Thread Dennis Cote
ntation at http://www.sqlite.org/opcode.html we have: The virtual machine contains an arbitrary number of registers locations with addresses beginning at one and growing upward. Each memory location can hold an arbitrary string. The registers hold all intermediate results of a calculation.

Re: [sqlite] sqlite3_prepare_v2(pDb, stmt, -1, , 0) for read the table

2008-04-10 Thread Dennis Cote
query select remoteId, bytesIn from compressTable where remoteId in (select remoteId from CDB.remoteWXTable where remoteType=1) */ sqlite3_exec(db, "detach database CDB"); HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] newbie question about laying out a simple database for bookings

2008-04-10 Thread Dennis Cote
008-04-23 2008-04-24 2008-04-25 test 6 2008-04-26 test 6 2008-04-27 test 6 2008-04-28 test 6 2008-04-29 test 6 2008-04-30 test 6 2008-05-01 2008-05-02 2008-05-03 2008-05-04 2008-05-05 2008-05-06 2008-05-07 2008-05-08 HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Select row names that start with this string...

2008-04-09 Thread Dennis Cote
scape character as it does in C and mySQL (I believe). In standard SQL you have to explicitly say which character you want to use as an escape character using the escape clause. Any character will work. HTH Dennis Cote ___ sqlite-users mailing li

Re: [sqlite] Left Join help

2008-04-09 Thread Dennis Cote
nstead of using the title index for the ordering, but there will hopefully be few records to sort, so it should be fast. How many records does this query return? HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] about addition extension

2008-04-09 Thread Dennis Cote
arting a new thread with each question). Having all the messages on a topic in a single thread makes it far easier for others to read and respond. Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mail

Re: [sqlite] Left Join help

2008-04-09 Thread Dennis Cote
then join the records with the same containerID using that index with another check for the required type. Finally it will select the indicated records from the container table based on the rows selected. HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Addition extension function failed!

2008-04-09 Thread Dennis Cote
odule and load that into the shell for the function to be available in the shell. See http://www.sqlite.org/cvstrac/wiki?p=LoadableExtensions and the shell's .load commnad for additional info. HTH Dennis Cote ___ sqlite-users mailing list sqlite-use

Re: [sqlite] Left Join help

2008-04-09 Thread Dennis Cote
uses the other index to find the matching records and checks that their type=1. These records should lead directly to the required container records using the primary key on that table. I would suspect this is reasonably fast. Let me know if it helps. HTH Dennis Cote SQLite version 3.5

Re: [sqlite] Inserting with related items that may not exist yet

2008-04-09 Thread Dennis Cote
first to see if it exists and if not then do the insert > (assuming all within a single transaction to avoid a race if another > thread is also inserting)? This feels like the wrong way to do it. > No, that is exactly the right way to do it. Dennis Cote __

Re: [sqlite] Update

2008-04-09 Thread Dennis Cote
that album so that it does refer to the retained record. The update trigger will decrement the count of the album records and remove them when they are no longer referenced by the music table. update ALBUM set AlbumName = 'xxx' where AlbumId = 1; update MUSIC set Album_Id = 1 where Album_id

Re: [sqlite] help about extension

2008-04-08 Thread Dennis Cote
icitly cast away the unsigned qualifier. const char *str; str = (const char*)sqlite3_value_text(...); HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] What is the standard way to store dates and do operations with dates please?

2008-04-07 Thread Dennis Cote
as best I can tell from the quoted Latin and its translation). As always you have to take everything on wikipedia with a grain of salt, but this looks authoritative. Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Security for SQLite

2008-04-07 Thread Dennis Cote
sword protected. Is it possible, and I just > missed it? And/or do you have another suggestion. > Not for the standard distribution, but if you check out http://www.hwaci.com/sw/sqlite/prosupport.html you will see that the author offers an encrypted database option for a

Re: [sqlite] newbie question about laying out a simple database for bookings

2008-04-07 Thread Dennis Cote
g booking that conflicts with a proposed new booking. The last query shows how to find all the bookings at a given time. HTH Dennis Cote -- resources that can be booked create table resource ( resource_id integer primary key, resource_name text unique ); insert into resource

Re: [sqlite] Limit Column Width

2008-04-07 Thread Dennis Cote
xt), ' ') from table Then the columns can be truncated using the substr() function as you suggest. The resulting strings should fit in your grid. HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] undefined function sqlite_open()

2008-04-07 Thread Dennis Cote
entioned 'resolved' posts indicated mod_rewrite was an/the > issue, so I tried enabling that in lighttpd.conf with no change in > results. This is just a guess since I don't use PHP, but is the function called sqlite3_open in PHP the same as it is in the C library? Note the '3' in the functio

Re: [sqlite] Create table error on AIX -- Unable to open database "mytest": SQL logic error or missing database

2008-04-07 Thread Dennis Cote
dited version? I suspect you may have a permission problem in the directory where you are trying to create the database file. You must have write permission in that directory. Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] problem with undefined reference

2008-04-07 Thread Dennis Cote
source and use that or try linking to the sqlite3 library installed on your system (if there is one). Try this: gcc CreaDB.c -lsqlite3 -o CreaDB HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/

Re: [sqlite] problem with undefined reference

2008-04-05 Thread Dennis Cote
le to your compile command. If you have the amalgamation source file you can do this. gcc CreaDB.c sqlite3.c -o CreaDB HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] What is the standard way to store dates and do operations with dates please?

2008-04-05 Thread Dennis Cote
ian day numbers. HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Adobe AIR Version Issue(?)

2008-04-05 Thread Dennis Cote
ll display the path to the file it has open. Ensure this is the same file you are opening in Air. You can check the version of sqlite running in Air by executing the following query: select sqlite_version(); HTH Dennis Cote ___ sqlite-users ma

Re: [sqlite] Multiple connections to an in-memory database

2008-04-04 Thread Dennis Cote
open on a database at any time. Locking is used to serialize transactions. Even with two connections, you can't have two active transactions. The second will stall waiting for the first to complete. Dennis Cote ___ sqlite-users mailing list sqlite-users@

Re: [sqlite] Update Trigger

2008-04-04 Thread Dennis Cote
ct some_value using music table) where AlbumId in (select some records using the music table ); If this isn't what you are looking for, you will have to describe your problem in more detail (i.e. what you are trying to do, an example of before and after data, etc.) before anyone can provi

Re: [sqlite] Indexing and Search speed

2008-03-31 Thread Dennis Cote
t value (i.e. one row and one column) for use in a comparison, but there is no restriction on what they can return. HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] last_insert_rowid

2008-03-27 Thread Dennis Cote
in advance, > No, you will be fine. The last_insert_rowid is maintained on a per connection basis. Each process has its own connection, and hence its own last_insert_rowid value. The two processes use file locking to provide exclusion when they are updating the database. HTH Dennis Cote __

Re: [sqlite] SQL error: SQL logic error or missing database

2008-03-26 Thread Dennis Cote
write permission in the directory where where your sqlite3 program is? SQLite needs write permission to create the database file and to open the journal file for any change to the database. HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] resetting a column back to its default value

2008-03-25 Thread Dennis Cote
r replace into t1(name) values('hello'); --works HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Problems Compiling Sqlite

2008-03-25 Thread Dennis Cote
.sqlite.org/cvstrac/wiki has a few pages that will help. http://www.sqlite.org/cvstrac/wiki?p=SqliteVfs is a skeleton vfs file that you will need for a new vfs implementation. HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http:/

Re: [sqlite] how can I find source of sqlite V 2.x

2008-03-25 Thread Dennis Cote
ownload page. For example the preprocessed source for version 2.8.17 can be had by modifying the link for the current version http://www.sqlite.org/sqlite-source-3_5_7.zip to be http://www.sqlite.org/sqlite-source-2_8_17.zip. Enter that in your browser and it will start the download. HTH

Re: [sqlite] Issue with LEFT JOIN, index, and literal in ON clause

2008-03-25 Thread Dennis Cote
y faster). > This is a bug and you should create a ticket at http://www.sqlite.org/cvstrac/tktnew so that it gets addressed. Adding an index should never change the result of a query. As for a workaround; What about simply dropping the index? In other words are you sure the correct version without the index is too slow? Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Problems Compiling Sqlite

2008-03-25 Thread Dennis Cote
call. If you don't need mutual exclusion (i.e. you are writing multithreaded code), then you can define SQLITE_MUTEX_NOOP to included a set of macros that effectively remove all mutex calls from SQLite. HTH Dennis Cote ___ sqlite-users mailing list sqli

Re: [sqlite] how to reply?

2008-03-25 Thread Dennis Cote
fer-Encoding: 7bit Sender: [EMAIL PROTECTED] Errors-To: [EMAIL PROTECTED] As you can see the Replay-To header is set correctly. HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Rowid After Sorting

2008-03-25 Thread Dennis Cote
in case 1. > Why do you want to find the index of a Name? Tables in SQL databases are not arrays. You don't use an index to retrieve the data. Tables are more like unordered sets of data. HTH Dennis Cote ___ sqlite-users mailing list sqlite-

Re: [sqlite] Regular Expressions and sqlite3_create_function

2008-03-20 Thread Dennis Cote
builtin functions in the source as well. It uses the same API's you will use. HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] nested tree table porting from mysql -> sqlite

2008-03-20 Thread Dennis Cote
refore portable to many other database systems, not just mySQL. Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Performance degradation after upgrade to 3.5.x on slow flash cards

2008-03-19 Thread Dennis Cote
formance regression in SQLite 3.5.6. I think you should create a ticket so the developers can look into it. You have shown quite clearly that it is the update statement that is at fault. I will take a look at the VDBE code generated by the update statement to see if anything jumps out at me. D

Re: [sqlite] Sorting and Descending Index

2008-03-19 Thread Dennis Cote
te> explain query plan select * from t2 order by a desc; 0|0|TABLE t2 WITH INDEX t2_a_dsc ORDER BY If you post the actual SQL statements you use to create the table and index, and the query you are using, someone will be able to figure out why it isn't using the index. HTH Dennis Cote ___

Re: [sqlite] Complex Query

2008-03-19 Thread Dennis Cote
widths explicitly. These commands determine how the shell displays the results of SQL queries. The explain command also changes the output mode to a column mode with headers and predetermined widths that are suitable for the output of "explain statement" queries. It would

<    1   2   3   4   5   6   7   8   9   10   >