Re: [sqlite] charindex function

2003-11-06 Thread D. Richard Hipp
Greg Obleshchuk wrote:
how do I get [my function] placed into the original source?
 
Print the copyright release at

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

Sign it and mail me a copy.  After I have your release
on file, you will be permitted to contribute code.
  D. Richard Hipp
  6200 Maple Cove Lane
  Charlotte, NC 28269
  USA
--
D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [sqlite] SQL92

2003-11-06 Thread Darren Duncan
>Hello,
>Does anyone have a web link to a document that details SQL92. 
>
>regards
>Greg O

For that matter, I would like to see a link to the details of SQL99, or whatever the 
newest SQL standard is.  I sorta need it, but my previous searches haven't worked... 
-- Darren Duncan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [sqlite] Performance problem

2003-11-06 Thread Mrs. Brisby
On Thu, 2003-11-06 at 19:00, [EMAIL PROTECTED] wrote:
> How would you handle the lack of ordering associate with hash tables? 
> Sqlite can currently use indicies for three main tests: equals, less than, 
> and greater than. While hash-tables are good at finding equal-to in 
> constant time it usually means linear time (a table-scan) to test for less 
> than or greater than. Do you have a solution to this problem?

You presume that a defining characteristic of a hash-table is that the
function be non-linear. Consider a n->3 bit function:
f(x) -> x mod 8
A very linear function that it is perfectly easy to iterate _in_order_
all values of the table.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [sqlite] database table is locked

2003-11-06 Thread ben . carlyle
- Forwarded by Ben Carlyle/AU/IRSA/Rail on 07/11/2003 10:03 AM -


Ben Carlyle
07/11/2003 10:03 AM


To: Thiago Mello <[EMAIL PROTECTED]>@CORP
cc: 
Subject:Re: [sqlite] database table is locked






Thiago Mello <[EMAIL PROTECTED]>
08/11/2003 09:00 AM

 
To: [EMAIL PROTECTED]
cc: 
Subject:[sqlite] database table is locked


> Im doing a SELECT sql query, and in the callback function of this sql
> query I do a UPDATE, so when I do this update I get 
> database table is locked.

> How I cant do the UPDATE in the second sqlite_exec() function?!

Either separate the two operations or bring them closer together. To 
separate them do something like:

BEGIN TRANSACTION;
SELECT ...; -- Collate results
-- Action results:
UPDATE ...;
UPDATE ...;
...
UPDATE ...;
END TRANSACTION;

To bring them closer together do something like this:

UPDATE foo = bar WHERE (SELECT ...)

It depends on what your query is and how you want to update the table in 
response to your table data.

Benjamin.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [sqlite] Performance problem

2003-11-06 Thread ben . carlyle
- Forwarded by Ben Carlyle/AU/IRSA/Rail on 07/11/2003 10:00 AM -


Ben Carlyle
07/11/2003 10:00 AM


To: "Mrs. Brisby" <[EMAIL PROTECTED]>@CORP
cc: 
Subject:Re: [sqlite] Performance problem






"Mrs. Brisby" <[EMAIL PROTECTED]>
07/11/2003 12:08 AM

 
To: "Jonas Forsman / Axier.SE" <[EMAIL PROTECTED]>
cc: "Clark, Chris" <[EMAIL PROTECTED]>, "D. Richard Hipp" <[EMAIL 
PROTECTED]>, 
[EMAIL PROTECTED]
Subject:Re: [sqlite] Performance problem


> On Wed, 2003-11-05 at 23:59, Jonas Forsman / Axier.SE wrote:
> > Note: Testing has shown PostgreSQL's hash indexes to be similar or 
slower
> > than B-tree indexes, and the index size and build time for hash 
indexes is
> > much worse. Hash indexes also suffer poor performance under high
> > concurrency. For these reasons, hash index use is discouraged.
> Please note I'm note I'm not talking about a hash of the entire key- I'm
> talking about n distinct b-trees that are selected by an 8->n bit
> function. This transformation can be made very fast: We get a speed
> improvement here on searches if our 8->n bit function takes less time
> than n-1 random memcmp()'s.

How would you handle the lack of ordering associate with hash tables? 
Sqlite can currently use indicies for three main tests: equals, less than, 
and greater than. While hash-tables are good at finding equal-to in 
constant time it usually means linear time (a table-scan) to test for less 
than or greater than. Do you have a solution to this problem?

Benjamin.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[sqlite] database table is locked

2003-11-06 Thread Thiago Mello
Hi,

Im doing a SELECT sql query, and in the callback function of this sql
query I do a UPDATE, so when I do this update I get 
database table is locked.

How I cant do the UPDATE in the second sqlite_exec() function?!

Thanks,

Thiago Mello


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [sqlite] Intentionally breaking SQLite integrity

2003-11-06 Thread D. Richard Hipp
Ben Nason wrote:
In order to test my error handling if "PRAGMA integrity_check;" fails, 
I'm looking for an easy way to introduce an integrity error into a 
database.  Any ideas?

Try writing random binary data into the middle of the database
file.  You can do the most damage by writing random data into
the bytes that immediately follow a 1k page boundary.  But skip
the first page, because changing it will make SQLite think the
file isn't even a database so it won't even open the file.
--
D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


[sqlite] Intentionally breaking SQLite integrity

2003-11-06 Thread Ben Nason
Hello,

In order to test my error handling if "PRAGMA integrity_check;" fails, 
I'm looking for an easy way to introduce an integrity error into a 
database.  Any ideas?

Thanks,
Ben
--
"As I walk out my door, step into the pollution,
 I breathe in the problems, exhale solutions" - C-Rayz Walz, "Bent Life"
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


[sqlite] No tables found by ODBC driver (Windows 2000)

2003-11-06 Thread Randy McLaughlin
I discovered sqlite today and it looks promising.  Many times in the past 
I've needed a lightweight, distributable database engine.  Checking it out, 
I created a small, one table database, using the SQLite Database 
Browser.  I installed the SQLite ODBC driver, set up a user DSN (My 
computer is running Windows 2000, by the way) and then attempted to access 
the table from Excel via Microsoft Query.

But when I attempt to open the database I receive a warning message: "This 
data source contains no visible tables."

I tried creating a couple more tables in different ways and they all show 
up using the Database Browser, but whenever I try to access them from 
Microsoft Query via ODBC I continue to be warned of no visible tables.

Could anyone suggest why my tables aren't being seen and what I can do so 
that they can be seen?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [sqlite] locking

2003-11-06 Thread Frank Baumgart
Kevin Waterson wrote:
if you are inside of a transaction, can other people read the database? 
 or does it lock the database file for the duration of the transaction?
It locks the db.

Regards,

Frank

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: [sqlite] Fields parameters

2003-11-06 Thread Bronislav Klucka
> > I've got a question, how could I get the field parameters (e.g. id is
> > integer and not null) I know that there is create table statment in
> > SQLITE_MASTER for each table, but I want to use sqlite in program
> > language
> > there is no regular exp. in so it is hard to parse this statement, I'm
> > looking for something like "describe table" statement in MySql.
> >
>
> Check out the various pragmas, particularly table_info and
> show_data_types.
>
>
Thnx, I've tried it and it works, but I also need to know if field is part
of key (or primary key) and if it is unique.






S pozdravem
Bronislav Klucka

=[ pro2-soft.com ]=
Bronislav Klucka  Pro2-Soft
+420 605 582 922 [EMAIL PROTECTED]

* Windows & Web applications, Computer traininghttp://pro2-soft.com
---


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]