[sqlite] DBIException: The name 'bdate' is not a valid index.

2007-09-19 Thread jose isaias cabrera


Greetings!

I have this db containing this table:

CREATE TABLE LSOpenJobs
   (
id integer primary key, ProjID integer, subProjID integer, parent, 
children, login, cust, proj, PClass, PSubClass, bdate, ddate, edate, pm, 
pmuk, lang, vendor, vEmail, invoice, ProjFund, PMTime, A_No, wDir, BiliDir, 
TMDir, DeliveryDir, paid, paidDate, notes, status, pages, ta

   );

I am trying to make a report and I am calling this select statement,

select ProjID, cust, proj, bdate, ddate, edate, sum(invoice), sum(ProjFund)
 from LSOpenJobs where ProjID = 423 AND PClass!='Quote' group by ProjID;

There are more than one record where ProjID = 423 and PClass != "Quote". 
But when I run the program, I get,


DBIException: The name 'invoice' is not a valid index.

Previously, I had this select statement,

select ProjID, cust, proj, min(bdate), max(ddate), max(edate), 
sum(invoice), sum(ProjFund)

 from LSOpenJobs where ProjID = 423 AND PClass!='Quote' group by ProjID;

But I would get,

DBIException: The name 'bdate' is not a valid index.

So, here is what I would like to do:
1. Get the lowest date possible from bdate
2. Get the highest date possible from ddate
3. Get the highest date possible from edate
4. Add all the values in invoice
5. Add all the values in ProjFund
6. Group it by ProjID.

I guess I could do it one by one and use the program to do this, but I 
rather use SQLite functions and receive one record with all the values 
desired.


Any help would be greatly appreciated.

thanks,

josé 



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] multiple databases

2007-09-19 Thread Gerry Snyder

[EMAIL PROTECTED] wrote:

There are no SQLite-specific talks or tutorials this year
  
Well, my talk Thursday afternoon is on using an SQLite database for 
storing Tcl/Tk scripts which are used for displaying and modifying 
SQLite databases. So although your statement is strictly correct, I will 
be saying a lot about SQLite.


I call my program GEB, because using SQLite as both the storage 
mechanism and object of manipulation reminded me of the "self reference 
at a higher level" that was a recurring theme in the book Gödel Escher 
Bach: An Eternal Golden Braid.


Looking forward to meeting many SQLiters and Tclers,

Gerry

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] multiple databases

2007-09-19 Thread John Stanton
I think that his project is to use simulation software to build a model 
of a network in software using a simulation package like NS2.  It models 
the network by implementing algorithms, not by setting up hardware.


Vitali Lovich wrote:
I think you need to clarify your needs a bit, cause it seems somewhat 
confusing.


So you have a wireless network, where all the nodes connect wirelessly 
to it.  What is the database being used for?  Is each node accessing and 
updating a local copy of some database (i.e. what other nodes it can 
see), or is it accessing a centrally managed database which all the 
nodes are accessing/updating.


Additionally, what exactly are you trying to simulate?  Are you trying 
to test how efficiently databases work over some kind of network (as a 
previous reply pointed out, this would be pointless with sqlite since 
sqlite is in-process and local) or are you trying to test out some kind 
of third algorithm where you just need to use some kind of database to 
store data.


nadiap wrote:


Hello,
i am a newbie and i would like to ask if it is possible to use sqlite in
order to simulate a wireless network where each node will have each own
database. I mean, can i attach each node to a database?  What shall i 
do? I

am sorry if my question seems naive, but i am just learning
Please help me.
Thank you
  



- 


To unsubscribe, send email to [EMAIL PROTECTED]
- 






-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Moving database connections across threads

2007-09-19 Thread John Stanton
The underlying issue with thread misbehaviour is that POSIX file locks 
are process specific, not thread specific requiring some tormented logic 
.  You only need the POSIX locks if you have multiple access to the same 
database and are writing to the database.


If you have a multi-threaded application and synchronize access using 
pthread rwlocks or on Windows read/write locks made from a mutex and 
event or semaphore then you can ignore the POSIX locks.  If your traffic 
rate is not very high you can just use a mutex around the Sqlite calls 
for synchronization.


In our threaded applications we use either rwlocks or a mutex and have 
the bonus of not having to add application logic to handle a BUSY state 
and endure busy waits and other polling indignities since the threads 
just block when there is contention.


If you have network connected files (like SMB or NFS) or multiple 
processes on one machine you will need the POSIX locks.


Mark Brown wrote:

Hi-

We have an application that wraps SQLite 3.4.1.  Due to some vxWorks
platform issues with non-standard posix behavior, we are considering
compiling SQLite with THREADSAFE = 0, and then having our application make
sure that only one thread can access SQLite at a time.  I was wondering
about the restriction regarding moving database connections across threads.


From the FAQ:


"The restriction on moving database connections across threads was relaxed
somewhat in version 3.3.1.  With that and subsequent versions, it is safe to
move a connection handle across threads as long as the connection is not
holding any fcntl() locks. You can safely assume that no locks are being
held if no transaction is pending and all statements have been finalized."  


Our application has one thread that opens the database connection and other
threads that use the connection to execute SQL.  All statements are created
at start-up, executed as needed, and then finalized on shutdown.  So, we do
violate the finalize criteria mentioned above.  However, does this still
apply if THREADSAFE = 0?

Let's assume that our application can correctly protect from multiple
threads executing code in the SQLite library at the same time, and also
allows only one transaction to occur at a time.

Thanks for your help,
Mark



-
To unsubscribe, send email to [EMAIL PROTECTED]
-




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] DB initial creation?

2007-09-19 Thread John Stanton
Sqlite is your friend.  It will automatically create the DB if it does 
not exist.


Gary G Allen wrote:

Thanks for the help thus far. The nice people on the list have provided
me with solutions to my issues I have run into so far.

We are considering using SQLite for a backend db on our device. It will
be used by the CLI & to store configuration data.

I do not see in the source code for any api to generate the initial db
file. When running, sqlite3 , the db file is generated for
you if not already available. How do I go about creating the initial
instance of the db file without having to run sqlite3 application?

Regards,
Gary

-
To unsubscribe, send email to [EMAIL PROTECTED]
-




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] multiple databases

2007-09-19 Thread John Stanton

nadiap wrote:

Hello,
i am a newbie and i would like to ask if it is possible to use sqlite in
order to simulate a wireless network where each node will have each own
database. I mean, can i attach each node to a database?  What shall i do? I
am sorry if my question seems naive, but i am just learning
Please help me.
Thank you
Sqlite is an excellent choice for your project.  You can link Sqlite 
into your application or use the TCL bound version and produce your 
simulation using TCL.


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] DB initial creation?

2007-09-19 Thread Lee Crain
Gary,

When you execute a sqlite3_open( ) function call, the database will be
created if it does not already exist.

Lee Crain

___



-Original Message-
From: Gary G Allen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 19, 2007 2:16 PM
To: sqlite-users@sqlite.org
Subject: [sqlite] DB initial creation? 

Thanks for the help thus far. The nice people on the list have provided
me with solutions to my issues I have run into so far.

We are considering using SQLite for a backend db on our device. It will
be used by the CLI & to store configuration data.

I do not see in the source code for any api to generate the initial db
file. When running, sqlite3 , the db file is generated for
you if not already available. How do I go about creating the initial
instance of the db file without having to run sqlite3 application?

Regards,
Gary

--
---
To unsubscribe, send email to [EMAIL PROTECTED]
--
---



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] DB initial creation?

2007-09-19 Thread Gary G Allen
Thanks for the help thus far. The nice people on the list have provided
me with solutions to my issues I have run into so far.

We are considering using SQLite for a backend db on our device. It will
be used by the CLI & to store configuration data.

I do not see in the source code for any api to generate the initial db
file. When running, sqlite3 , the db file is generated for
you if not already available. How do I go about creating the initial
instance of the db file without having to run sqlite3 application?

Regards,
Gary

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] Moving database connections across threads

2007-09-19 Thread Mark Brown
Hi-

We have an application that wraps SQLite 3.4.1.  Due to some vxWorks
platform issues with non-standard posix behavior, we are considering
compiling SQLite with THREADSAFE = 0, and then having our application make
sure that only one thread can access SQLite at a time.  I was wondering
about the restriction regarding moving database connections across threads.

>From the FAQ:

"The restriction on moving database connections across threads was relaxed
somewhat in version 3.3.1.  With that and subsequent versions, it is safe to
move a connection handle across threads as long as the connection is not
holding any fcntl() locks. You can safely assume that no locks are being
held if no transaction is pending and all statements have been finalized."  

Our application has one thread that opens the database connection and other
threads that use the connection to execute SQL.  All statements are created
at start-up, executed as needed, and then finalized on shutdown.  So, we do
violate the finalize criteria mentioned above.  However, does this still
apply if THREADSAFE = 0?

Let's assume that our application can correctly protect from multiple
threads executing code in the SQLite library at the same time, and also
allows only one transaction to occur at a time.

Thanks for your help,
Mark



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Opinions about per-row tokenizers for fts?

2007-09-19 Thread Scott Hess
On 9/19/07, Ralf Junker <[EMAIL PROTECTED]> wrote:
> >Regarding per-row versus per-column tokenizers, your suggesting to
> >have something like 'content_kr TOKENIZER icu_kr' for each variant is
> >reasonable, but I'm not certain what gain it would have over simply
> >having separate tables for each variant.  Since data about records is
> >pushed into the schema itself, you potentially have to generate fairly
> >intricate queries, probably dynamically.
>
> Queries like this
>
>   select * from recipe where recipe match 'pie';
>
> would not need dynamic creation.

But wouldn't this usage exactly _force_ you to tokenize the query for
every column-defined tokenizer, and match against each column
separately?  I had thought you meant something like:

   select * from recipe where recipe_kr match 'pie';

to force the tokenizer selection.

> >This implementation also suffers from the query-tokenization problem you 
> >mention.
>
> I suggested column-tokenizers to work around the query-tokenization problem.
> The column-tokenizer definition would enable FTS to parse the query using
> the appropriate tokenizer for each row. Users would be guaranteed that each
> column would be searched with its matching query tokenizer. This would of
> course mean that, for multiple columns of different tokenizers, FTS would
> have to search each column individually.

My original reading of your concern was that you'd have to re-tokenize
the query for every possible tokenizer, which I understood was
considered expensive (it would be!).  But now it sounds like you
desire that for correctness reasons?

My proposal had two areas of tokenization, which were disconnected.
There was tokenization of documents before building a unified index,
and tokenization of queries before querying that unified index.  While
you might assert that a query is in English, you might get hits from
documents written in Korean.  This is certainly a mixed bag, but it
does loosely match the way such things are done in large-scale systems
such as web-search (which is a strong input from my end, for obvious
reasons!).

> >To be clear on the type of problem my proposal was targetted at, say
> >you have something like Google Reader, where there are a bunch of
> >articles that you want to search over.  Each article generally doesn't
> >have multiple translated variants, instead the language is a piece of
> >data about the article.  For this kind of system, pre-defining columns
> >for every language the system may encounter might result in dozens of
> >columns, with exactly one column used for any particular row.
> >
> >NOTE: I think that your idea of per-column default tokenizers may be a
> >good idea for fts to have.  I'm just questioning whether it is
> >targetted at the same problem my proposal is.
>
> Both approaches certainly have somewhat different targets from a user's
> perspective. Form a storage perspective, the column approach is reasonable
> if most columns contain non-null values or if storage space for a null value
> is negligable.

One concern I have is that the use-cases I've seen are likely to
result in a fair number of columns, possibly with combinatoric impacts
(60 language-custom versions multiplied by 5 desired columns).  I
don't have a strong enough formal grounding in database systems to put
up a quantifiable argument, but I know that anytime I've seen a schema
along these lines, it turned out to be wrong :-).

> >Regarding query tokenization, yes, the query must be parsed using a
> >tokenizer appropriate to the query.  That was where the suggested
> >change to the query syntax came from:
> >
> >   SELECT rowid FROM t WHERE t MATCH 'tokenizer: ...';
>
> If the tokenizer must be explicitly stated, wouldn't this require to 
> construct queries
> danymically?

The fts query is in a place where it's easy to construct dynamically
by adjusting the strong passed into sqlite3_bind_*().  The distinction
I'm making is whether you're constructing the SQL query itself
dynamically, which, in my experience, almost always means you're
expressing something inappropriately.

> In addition to that, must not the user take care that the tokenizer properly
> matches the row? My column-tokenizer suggestion (as I immagine it) would
> release users from this responsibility.

Again, I'm asserting that, in general, the query is in a specific
language, in which case the content of the rows themselves is not
material.  You can certainly construct queries which contain elements
from multiple languages, but solving that is a very hard problem (to
match an AND query containing elements requiring multiple tokenizers
will require the ability to change tokenizers within an fts column!).

> >Tokenizing the query using every possible tokenizer may result in more
> >results, but is unlikely to result in higher quality of results.
>
> Besides this, I am concerned that results might be missed because the
> the query tokenizer does not match the text tokenizer.

This is a bigger 

RE: [sqlite] Callback Function Not Working In Example Code

2007-09-19 Thread Lee Crain
Gary,

Your email sounds like you are executing an INSERT record command. 

The callback function is only called when you execute a SELECT and data is
returned as a result of your query.

Lee Crain

___


-Original Message-
From: Gary G Allen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 19, 2007 10:13 AM
To: sqlite-users@sqlite.org
Subject: [sqlite] Callback Function Not Working In Example Code

I appreciate the help yesterday. John Stanton's advice with the compiler
option got me going.

I have the example code from http://www.sqlite.org/quickstart.html
running. See code below.

However, the callback function is not getting executed.  Everything
looks correct to me and the callback function should be getting called.
I can create an instance where sqlite3_exec is executed properly and the
entry is made in the database.

Anyone have any suggestions to what might be going on?

Here are the compiler options I am using:
 %>gcc -o sql_test -lsqlite3 sql_test.c

Regards,
Gary


-
#include 
#include 

static int callback(void *NotUsed, int argc, char **argv, char
**azColName){
  int i;
  for(i=0; i

[sqlite] Callback Function Not Working In Example Code

2007-09-19 Thread Gary G Allen
I appreciate the help yesterday. John Stanton's advice with the compiler
option got me going.

I have the example code from http://www.sqlite.org/quickstart.html
running. See code below.

However, the callback function is not getting executed.  Everything
looks correct to me and the callback function should be getting called.
I can create an instance where sqlite3_exec is executed properly and the
entry is made in the database.

Anyone have any suggestions to what might be going on?

Here are the compiler options I am using:
 %>gcc -o sql_test -lsqlite3 sql_test.c

Regards,
Gary


-
#include 
#include 

static int callback(void *NotUsed, int argc, char **argv, char
**azColName){
  int i;
  for(i=0; i

RE: [sqlite] SQLite.Net

2007-09-19 Thread Samuel R. Neff
Michael,

I haven't used the wrapper you mentioned so I can't help with the specific
problem in that wrapper.  However, I do use the one Robert suggested heavily
and can attest to the fact that it is extremely well written and works
without errors.  It's also an ADO.NET implementation making the code to use
the wrapper much easier to write for an experienced .NET developer and more
consistent with all other .NET database code.  I personally believe the
small amount of time it would take to convert would be worthwhile.

Perhaps changing the subject line to mention the specific wrapper
"phpguru.org's SQLite.NET wrapper" can attract the right attention.  You can
also e-mail the author of the wrapper since there is no mailing list for the
wrapper.  http://www.phpguru.org/static/freelance.html

HTH,

Sam


---
We’re Hiring! Seeking a passionate developer to join our team building
products. Position is in the Washington D.C. metro area. If interested
contact [EMAIL PROTECTED]
 
-Original Message-
From: Michael Martin [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 19, 2007 11:29 AM
To: sqlite-users@sqlite.org
Subject: RE: [sqlite] SQLite.Net

Ok, but why I can't use this wrapper
http://www.phpguru.org/static/SQLite.NET.html ?


-Message d'origine-
De : Robert Simpson [mailto:[EMAIL PROTECTED] 
Envoyé : mercredi 19 septembre 2007 17:16
À : sqlite-users@sqlite.org
Objet : RE: [sqlite] SQLite.Net

And for good reason ... Adapting the sqlite3 api to .NET is not trivial. 

> -Original Message-
> From: Michael Martin [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, September 19, 2007 8:09 AM
> To: sqlite-users@sqlite.org
> Subject: RE: [sqlite] SQLite.Net
> 
> I am using this http://www.phpguru.org/static/SQLite.NET.html
> 
> I have the "attempted to read or write protected memory" 
> exception with this wrapper.
> 
> If I try to define my own wrapper with sqlite3.dll it crashes 
> on select statement.
> 
> -Message d'origine-
> De : Robert Simpson [mailto:[EMAIL PROTECTED] 
> Envoyé : mercredi 19 septembre 2007 17:00
> À : sqlite-users@sqlite.org
> Objet : RE: [sqlite] SQLite.Net
> 
> If you're using the Finisar library, it doesn't work with the 
> later sqlite3
> libraries.  If you're using the PHP one, it hasn't been 
> updated in almost 3
> years so it probably has issues as well.
> 
> Your best bet is to use the ADO.NET 2.0 provider at
> http://sqlite.phxsoftware.com
> 
> Robert


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] SQLite.Net

2007-09-19 Thread Robert Simpson
The wrapper on phpguru hasn't been updated in almost 3 years and isn't
actively maintained or supported.  I'm sure it worked fine against an older
version of the SQLite engine, but there've been quite a few changes to the
engine since then.

Robert


> -Original Message-
> From: Michael Martin [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, September 19, 2007 8:29 AM
> To: sqlite-users@sqlite.org
> Subject: RE: [sqlite] SQLite.Net
> 
> Ok, but why I can't use this wrapper 
> http://www.phpguru.org/static/SQLite.NET.html ?
> 
> 
> -Message d'origine-
> De : Robert Simpson [mailto:[EMAIL PROTECTED] 
> Envoyé : mercredi 19 septembre 2007 17:16
> À : sqlite-users@sqlite.org
> Objet : RE: [sqlite] SQLite.Net
> 
> And for good reason ... Adapting the sqlite3 api to .NET is 
> not trivial. 
> 
> > -Original Message-
> > From: Michael Martin [mailto:[EMAIL PROTECTED] 
> > Sent: Wednesday, September 19, 2007 8:09 AM
> > To: sqlite-users@sqlite.org
> > Subject: RE: [sqlite] SQLite.Net
> > 
> > I am using this http://www.phpguru.org/static/SQLite.NET.html
> > 
> > I have the "attempted to read or write protected memory" 
> > exception with this wrapper.
> > 
> > If I try to define my own wrapper with sqlite3.dll it crashes 
> > on select statement.
> > 
> > -Message d'origine-
> > De : Robert Simpson [mailto:[EMAIL PROTECTED] 
> > Envoyé : mercredi 19 septembre 2007 17:00
> > À : sqlite-users@sqlite.org
> > Objet : RE: [sqlite] SQLite.Net
> > 
> > If you're using the Finisar library, it doesn't work with the 
> > later sqlite3
> > libraries.  If you're using the PHP one, it hasn't been 
> > updated in almost 3
> > years so it probably has issues as well.
> > 
> > Your best bet is to use the ADO.NET 2.0 provider at
> > http://sqlite.phxsoftware.com
> > 
> > Robert
> >  
> > 
> > > -Original Message-
> > > From: Michael Martin [mailto:[EMAIL PROTECTED] 
> > > Sent: Wednesday, September 19, 2007 7:42 AM
> > > To: sqlite-users@sqlite.org
> > > Subject: RE: [sqlite] SQLite.Net
> > > 
> > > SQLite.NET.2.0.1
> > > 
> > > -Message d'origine-
> > > De : Robert Simpson [mailto:[EMAIL PROTECTED] 
> > > Envoyé : mercredi 19 septembre 2007 16:31
> > > À : sqlite-users@sqlite.org
> > > Objet : RE: [sqlite] SQLite.Net
> > > 
> > > What .NET wrapper are you using? 
> > > 
> > > > -Original Message-
> > > > From: Michael Martin [mailto:[EMAIL PROTECTED] 
> > > > Sent: Wednesday, September 19, 2007 7:13 AM
> > > > To: sqlite-users@sqlite.org
> > > > Subject: [sqlite] SQLite.Net
> > > > 
> > > > Hi all,
> > > > 
> > > >  
> > > > 
> > > > I try to use SQLite (sqlite3.dll)  in DotNet; this is my code :
> > > > 
> > > >  
> > > > 
> > > > SQLiteClient db= new SQLiteClient("test.db");
> > > > 
> > > > SQLiteResultSet results;
> > > > 
> > > > results = db.Execute("create table Table1(one 
> > > int primary
> > > > key, two varchar(10));");
> > > > 
> > > > results = db.Execute("insert into Table1
> > > > values(1,'hello');");
> > > > 
> > > > results = db.Execute("insert into Table1
> > > > values(2,'hello');");
> > > > 
> > > > results = db.Execute("select * from Table1");
> > > > 
> > > >  
> > > > 
> > > > The problem was on the select statement because I have a 
> > crash with
> > > > sqlite3.dll or a "attempted to read or write protected memory 
> > > > exception"
> > > > with sqlite.dll.
> > > > 
> > > >  
> > > > 
> > > > I don't understant why.
> > > > 
> > > >  
> > > > 
> > > > Could someone help me please
> > > > 
> > > >  
> > > > 
> > > > Thanks in advance
> > > > 
> > > >  
> > > > 
> > > >  
> > > > 
> > > >  
> > > > 
> > > > 
> > > 
> > > 
> > > 
> > > --
> > > ---
> > > To unsubscribe, send email to [EMAIL PROTECTED]
> > > --
> > > ---
> > > 
> > > 
> > > --
> > > ---
> > > To unsubscribe, send email to [EMAIL PROTECTED]
> > > --
> > > ---
> > > 
> > 
> > 
> > 
> > --
> > ---
> > To unsubscribe, send email to [EMAIL PROTECTED]
> > --
> > ---
> > 
> > 
> > --
> > ---
> > To unsubscribe, send email to [EMAIL PROTECTED]
> > --
> > ---
> > 
> 
> 
> 
> --
> ---
> To unsubscribe, send email to [EMAIL PROTECTED]
> --
> ---
> 
> 
> --
> 

RE: [sqlite] SQLite.Net

2007-09-19 Thread Michael Martin
Ok, but why I can't use this wrapper 
http://www.phpguru.org/static/SQLite.NET.html ?


-Message d'origine-
De : Robert Simpson [mailto:[EMAIL PROTECTED] 
Envoyé : mercredi 19 septembre 2007 17:16
À : sqlite-users@sqlite.org
Objet : RE: [sqlite] SQLite.Net

And for good reason ... Adapting the sqlite3 api to .NET is not trivial. 

> -Original Message-
> From: Michael Martin [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, September 19, 2007 8:09 AM
> To: sqlite-users@sqlite.org
> Subject: RE: [sqlite] SQLite.Net
> 
> I am using this http://www.phpguru.org/static/SQLite.NET.html
> 
> I have the "attempted to read or write protected memory" 
> exception with this wrapper.
> 
> If I try to define my own wrapper with sqlite3.dll it crashes 
> on select statement.
> 
> -Message d'origine-
> De : Robert Simpson [mailto:[EMAIL PROTECTED] 
> Envoyé : mercredi 19 septembre 2007 17:00
> À : sqlite-users@sqlite.org
> Objet : RE: [sqlite] SQLite.Net
> 
> If you're using the Finisar library, it doesn't work with the 
> later sqlite3
> libraries.  If you're using the PHP one, it hasn't been 
> updated in almost 3
> years so it probably has issues as well.
> 
> Your best bet is to use the ADO.NET 2.0 provider at
> http://sqlite.phxsoftware.com
> 
> Robert
>  
> 
> > -Original Message-
> > From: Michael Martin [mailto:[EMAIL PROTECTED] 
> > Sent: Wednesday, September 19, 2007 7:42 AM
> > To: sqlite-users@sqlite.org
> > Subject: RE: [sqlite] SQLite.Net
> > 
> > SQLite.NET.2.0.1
> > 
> > -Message d'origine-
> > De : Robert Simpson [mailto:[EMAIL PROTECTED] 
> > Envoyé : mercredi 19 septembre 2007 16:31
> > À : sqlite-users@sqlite.org
> > Objet : RE: [sqlite] SQLite.Net
> > 
> > What .NET wrapper are you using? 
> > 
> > > -Original Message-
> > > From: Michael Martin [mailto:[EMAIL PROTECTED] 
> > > Sent: Wednesday, September 19, 2007 7:13 AM
> > > To: sqlite-users@sqlite.org
> > > Subject: [sqlite] SQLite.Net
> > > 
> > > Hi all,
> > > 
> > >  
> > > 
> > > I try to use SQLite (sqlite3.dll)  in DotNet; this is my code :
> > > 
> > >  
> > > 
> > > SQLiteClient db= new SQLiteClient("test.db");
> > > 
> > > SQLiteResultSet results;
> > > 
> > > results = db.Execute("create table Table1(one 
> > int primary
> > > key, two varchar(10));");
> > > 
> > > results = db.Execute("insert into Table1
> > > values(1,'hello');");
> > > 
> > > results = db.Execute("insert into Table1
> > > values(2,'hello');");
> > > 
> > > results = db.Execute("select * from Table1");
> > > 
> > >  
> > > 
> > > The problem was on the select statement because I have a 
> crash with
> > > sqlite3.dll or a "attempted to read or write protected memory 
> > > exception"
> > > with sqlite.dll.
> > > 
> > >  
> > > 
> > > I don't understant why.
> > > 
> > >  
> > > 
> > > Could someone help me please
> > > 
> > >  
> > > 
> > > Thanks in advance
> > > 
> > >  
> > > 
> > >  
> > > 
> > >  
> > > 
> > > 
> > 
> > 
> > 
> > --
> > ---
> > To unsubscribe, send email to [EMAIL PROTECTED]
> > --
> > ---
> > 
> > 
> > --
> > ---
> > To unsubscribe, send email to [EMAIL PROTECTED]
> > --
> > ---
> > 
> 
> 
> 
> --
> ---
> To unsubscribe, send email to [EMAIL PROTECTED]
> --
> ---
> 
> 
> --
> ---
> To unsubscribe, send email to [EMAIL PROTECTED]
> --
> ---
> 



-
To unsubscribe, send email to [EMAIL PROTECTED]
-


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] SQLite.Net

2007-09-19 Thread Robert Simpson
And for good reason ... Adapting the sqlite3 api to .NET is not trivial. 

> -Original Message-
> From: Michael Martin [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, September 19, 2007 8:09 AM
> To: sqlite-users@sqlite.org
> Subject: RE: [sqlite] SQLite.Net
> 
> I am using this http://www.phpguru.org/static/SQLite.NET.html
> 
> I have the "attempted to read or write protected memory" 
> exception with this wrapper.
> 
> If I try to define my own wrapper with sqlite3.dll it crashes 
> on select statement.
> 
> -Message d'origine-
> De : Robert Simpson [mailto:[EMAIL PROTECTED] 
> Envoyé : mercredi 19 septembre 2007 17:00
> À : sqlite-users@sqlite.org
> Objet : RE: [sqlite] SQLite.Net
> 
> If you're using the Finisar library, it doesn't work with the 
> later sqlite3
> libraries.  If you're using the PHP one, it hasn't been 
> updated in almost 3
> years so it probably has issues as well.
> 
> Your best bet is to use the ADO.NET 2.0 provider at
> http://sqlite.phxsoftware.com
> 
> Robert
>  
> 
> > -Original Message-
> > From: Michael Martin [mailto:[EMAIL PROTECTED] 
> > Sent: Wednesday, September 19, 2007 7:42 AM
> > To: sqlite-users@sqlite.org
> > Subject: RE: [sqlite] SQLite.Net
> > 
> > SQLite.NET.2.0.1
> > 
> > -Message d'origine-
> > De : Robert Simpson [mailto:[EMAIL PROTECTED] 
> > Envoyé : mercredi 19 septembre 2007 16:31
> > À : sqlite-users@sqlite.org
> > Objet : RE: [sqlite] SQLite.Net
> > 
> > What .NET wrapper are you using? 
> > 
> > > -Original Message-
> > > From: Michael Martin [mailto:[EMAIL PROTECTED] 
> > > Sent: Wednesday, September 19, 2007 7:13 AM
> > > To: sqlite-users@sqlite.org
> > > Subject: [sqlite] SQLite.Net
> > > 
> > > Hi all,
> > > 
> > >  
> > > 
> > > I try to use SQLite (sqlite3.dll)  in DotNet; this is my code :
> > > 
> > >  
> > > 
> > > SQLiteClient db= new SQLiteClient("test.db");
> > > 
> > > SQLiteResultSet results;
> > > 
> > > results = db.Execute("create table Table1(one 
> > int primary
> > > key, two varchar(10));");
> > > 
> > > results = db.Execute("insert into Table1
> > > values(1,'hello');");
> > > 
> > > results = db.Execute("insert into Table1
> > > values(2,'hello');");
> > > 
> > > results = db.Execute("select * from Table1");
> > > 
> > >  
> > > 
> > > The problem was on the select statement because I have a 
> crash with
> > > sqlite3.dll or a "attempted to read or write protected memory 
> > > exception"
> > > with sqlite.dll.
> > > 
> > >  
> > > 
> > > I don't understant why.
> > > 
> > >  
> > > 
> > > Could someone help me please
> > > 
> > >  
> > > 
> > > Thanks in advance
> > > 
> > >  
> > > 
> > >  
> > > 
> > >  
> > > 
> > > 
> > 
> > 
> > 
> > --
> > ---
> > To unsubscribe, send email to [EMAIL PROTECTED]
> > --
> > ---
> > 
> > 
> > --
> > ---
> > To unsubscribe, send email to [EMAIL PROTECTED]
> > --
> > ---
> > 
> 
> 
> 
> --
> ---
> To unsubscribe, send email to [EMAIL PROTECTED]
> --
> ---
> 
> 
> --
> ---
> To unsubscribe, send email to [EMAIL PROTECTED]
> --
> ---
> 



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] SQLite.Net

2007-09-19 Thread Michael Martin
I am using this http://www.phpguru.org/static/SQLite.NET.html

I have the "attempted to read or write protected memory" exception with this 
wrapper.

If I try to define my own wrapper with sqlite3.dll it crashes on select 
statement.

-Message d'origine-
De : Robert Simpson [mailto:[EMAIL PROTECTED] 
Envoyé : mercredi 19 septembre 2007 17:00
À : sqlite-users@sqlite.org
Objet : RE: [sqlite] SQLite.Net

If you're using the Finisar library, it doesn't work with the later sqlite3
libraries.  If you're using the PHP one, it hasn't been updated in almost 3
years so it probably has issues as well.

Your best bet is to use the ADO.NET 2.0 provider at
http://sqlite.phxsoftware.com

Robert
 

> -Original Message-
> From: Michael Martin [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, September 19, 2007 7:42 AM
> To: sqlite-users@sqlite.org
> Subject: RE: [sqlite] SQLite.Net
> 
> SQLite.NET.2.0.1
> 
> -Message d'origine-
> De : Robert Simpson [mailto:[EMAIL PROTECTED] 
> Envoyé : mercredi 19 septembre 2007 16:31
> À : sqlite-users@sqlite.org
> Objet : RE: [sqlite] SQLite.Net
> 
> What .NET wrapper are you using? 
> 
> > -Original Message-
> > From: Michael Martin [mailto:[EMAIL PROTECTED] 
> > Sent: Wednesday, September 19, 2007 7:13 AM
> > To: sqlite-users@sqlite.org
> > Subject: [sqlite] SQLite.Net
> > 
> > Hi all,
> > 
> >  
> > 
> > I try to use SQLite (sqlite3.dll)  in DotNet; this is my code :
> > 
> >  
> > 
> > SQLiteClient db= new SQLiteClient("test.db");
> > 
> > SQLiteResultSet results;
> > 
> > results = db.Execute("create table Table1(one 
> int primary
> > key, two varchar(10));");
> > 
> > results = db.Execute("insert into Table1
> > values(1,'hello');");
> > 
> > results = db.Execute("insert into Table1
> > values(2,'hello');");
> > 
> > results = db.Execute("select * from Table1");
> > 
> >  
> > 
> > The problem was on the select statement because I have a crash with
> > sqlite3.dll or a "attempted to read or write protected memory 
> > exception"
> > with sqlite.dll.
> > 
> >  
> > 
> > I don't understant why.
> > 
> >  
> > 
> > Could someone help me please
> > 
> >  
> > 
> > Thanks in advance
> > 
> >  
> > 
> >  
> > 
> >  
> > 
> > 
> 
> 
> 
> --
> ---
> To unsubscribe, send email to [EMAIL PROTECTED]
> --
> ---
> 
> 
> --
> ---
> To unsubscribe, send email to [EMAIL PROTECTED]
> --
> ---
> 



-
To unsubscribe, send email to [EMAIL PROTECTED]
-


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] SQLite.Net

2007-09-19 Thread Robert Simpson
If you're using the Finisar library, it doesn't work with the later sqlite3
libraries.  If you're using the PHP one, it hasn't been updated in almost 3
years so it probably has issues as well.

Your best bet is to use the ADO.NET 2.0 provider at
http://sqlite.phxsoftware.com

Robert
 

> -Original Message-
> From: Michael Martin [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, September 19, 2007 7:42 AM
> To: sqlite-users@sqlite.org
> Subject: RE: [sqlite] SQLite.Net
> 
> SQLite.NET.2.0.1
> 
> -Message d'origine-
> De : Robert Simpson [mailto:[EMAIL PROTECTED] 
> Envoyé : mercredi 19 septembre 2007 16:31
> À : sqlite-users@sqlite.org
> Objet : RE: [sqlite] SQLite.Net
> 
> What .NET wrapper are you using? 
> 
> > -Original Message-
> > From: Michael Martin [mailto:[EMAIL PROTECTED] 
> > Sent: Wednesday, September 19, 2007 7:13 AM
> > To: sqlite-users@sqlite.org
> > Subject: [sqlite] SQLite.Net
> > 
> > Hi all,
> > 
> >  
> > 
> > I try to use SQLite (sqlite3.dll)  in DotNet; this is my code :
> > 
> >  
> > 
> > SQLiteClient db= new SQLiteClient("test.db");
> > 
> > SQLiteResultSet results;
> > 
> > results = db.Execute("create table Table1(one 
> int primary
> > key, two varchar(10));");
> > 
> > results = db.Execute("insert into Table1
> > values(1,'hello');");
> > 
> > results = db.Execute("insert into Table1
> > values(2,'hello');");
> > 
> > results = db.Execute("select * from Table1");
> > 
> >  
> > 
> > The problem was on the select statement because I have a crash with
> > sqlite3.dll or a "attempted to read or write protected memory 
> > exception"
> > with sqlite.dll.
> > 
> >  
> > 
> > I don't understant why.
> > 
> >  
> > 
> > Could someone help me please
> > 
> >  
> > 
> > Thanks in advance
> > 
> >  
> > 
> >  
> > 
> >  
> > 
> > 
> 
> 
> 
> --
> ---
> To unsubscribe, send email to [EMAIL PROTECTED]
> --
> ---
> 
> 
> --
> ---
> To unsubscribe, send email to [EMAIL PROTECTED]
> --
> ---
> 



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] SQLite.Net

2007-09-19 Thread Michael Martin
SQLite.NET.2.0.1

-Message d'origine-
De : Robert Simpson [mailto:[EMAIL PROTECTED] 
Envoyé : mercredi 19 septembre 2007 16:31
À : sqlite-users@sqlite.org
Objet : RE: [sqlite] SQLite.Net

What .NET wrapper are you using? 

> -Original Message-
> From: Michael Martin [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, September 19, 2007 7:13 AM
> To: sqlite-users@sqlite.org
> Subject: [sqlite] SQLite.Net
> 
> Hi all,
> 
>  
> 
> I try to use SQLite (sqlite3.dll)  in DotNet; this is my code :
> 
>  
> 
> SQLiteClient db= new SQLiteClient("test.db");
> 
> SQLiteResultSet results;
> 
> results = db.Execute("create table Table1(one int primary
> key, two varchar(10));");
> 
> results = db.Execute("insert into Table1
> values(1,'hello');");
> 
> results = db.Execute("insert into Table1
> values(2,'hello');");
> 
> results = db.Execute("select * from Table1");
> 
>  
> 
> The problem was on the select statement because I have a crash with
> sqlite3.dll or a "attempted to read or write protected memory 
> exception"
> with sqlite.dll.
> 
>  
> 
> I don't understant why.
> 
>  
> 
> Could someone help me please
> 
>  
> 
> Thanks in advance
> 
>  
> 
>  
> 
>  
> 
> 



-
To unsubscribe, send email to [EMAIL PROTECTED]
-


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] SQLite.Net

2007-09-19 Thread Robert Simpson
What .NET wrapper are you using? 

> -Original Message-
> From: Michael Martin [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, September 19, 2007 7:13 AM
> To: sqlite-users@sqlite.org
> Subject: [sqlite] SQLite.Net
> 
> Hi all,
> 
>  
> 
> I try to use SQLite (sqlite3.dll)  in DotNet; this is my code :
> 
>  
> 
> SQLiteClient db= new SQLiteClient("test.db");
> 
> SQLiteResultSet results;
> 
> results = db.Execute("create table Table1(one int primary
> key, two varchar(10));");
> 
> results = db.Execute("insert into Table1
> values(1,'hello');");
> 
> results = db.Execute("insert into Table1
> values(2,'hello');");
> 
> results = db.Execute("select * from Table1");
> 
>  
> 
> The problem was on the select statement because I have a crash with
> sqlite3.dll or a "attempted to read or write protected memory 
> exception"
> with sqlite.dll.
> 
>  
> 
> I don't understant why.
> 
>  
> 
> Could someone help me please
> 
>  
> 
> Thanks in advance
> 
>  
> 
>  
> 
>  
> 
> 



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] SQLite.Net

2007-09-19 Thread Michael Martin
Hi all,

 

I try to use SQLite (sqlite3.dll)  in DotNet; this is my code :

 

SQLiteClient db= new SQLiteClient("test.db");

SQLiteResultSet results;

results = db.Execute("create table Table1(one int primary
key, two varchar(10));");

results = db.Execute("insert into Table1
values(1,'hello');");

results = db.Execute("insert into Table1
values(2,'hello');");

results = db.Execute("select * from Table1");

 

The problem was on the select statement because I have a crash with
sqlite3.dll or a "attempted to read or write protected memory exception"
with sqlite.dll.

 

I don't understant why.

 

Could someone help me please

 

Thanks in advance

 

 

 



RE: [sqlite] multiple databases

2007-09-19 Thread Samuel R. Neff

Most likely if you're simulating networks where there is a db in each node
then you really want to simulate network traffic based on that db protocol.
SQLite is an embedded database that runs in-process and by definition has no
network traffic or protocol (except if you count opening a database over a
shared file server, but then you're really doing file i/o and not db i/o).
I think you need a network database for this type of simulation.
Additionally, I'm sure the results will be very different depending on the
database since they all have their own protocol with different bandwidth and
usage characteristics, so you need to take a lot of care in choosing the
right database for your simulation needs and possible would want to try with
a few different db engines.

HTH,

Sam 


---
We're Hiring! Seeking a passionate developer to join our team building
products. Position is in the Washington D.C. metro area. If interested
contact [EMAIL PROTECTED]
 
-Original Message-
From: nadiap [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 19, 2007 8:33 AM
To: sqlite-users@sqlite.org
Subject: [sqlite] multiple databases


Hello,
i am a newbie and i would like to ask if it is possible to use sqlite in
order to simulate a wireless network where each node will have each own
database. I mean, can i attach each node to a database?  What shall i do? I
am sorry if my question seems naive, but i am just learning
Please help me.
Thank you
-- 
View this message in context:
http://www.nabble.com/multiple-databases-tf4480719.html#a12776486
Sent from the SQLite mailing list archive at Nabble.com.



-
To unsubscribe, send email to [EMAIL PROTECTED]

-


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] RE: multiple databases

2007-09-19 Thread nadiap

Mr Samuel thank  you very much for your reply.
I am a little bit confused though..
I use network simulator 2 and what i am doing is to simulate a wireless
network. I have to mention that the simulation is done on the same machine.
Network simulator2 uses c++ interface, so i thought that i could attach a
database on each node. Additionally , i don;t think that the network traffic
would be a problem since only one database at time will be accesed. However,
Dbs is something new to me and i believe that you do know more things. 
Would you suggest me a traffic db as you mentioned? i am googling all day
but the confusion keeps growing.
Thank you once again.

-- 
View this message in context: 
http://www.nabble.com/multiple-databases-tf4480719.html#a12777178
Sent from the SQLite mailing list archive at Nabble.com.


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] multiple databases

2007-09-19 Thread nadiap

Hello,
i am a newbie and i would like to ask if it is possible to use sqlite in
order to simulate a wireless network where each node will have each own
database. I mean, can i attach each node to a database?  What shall i do? I
am sorry if my question seems naive, but i am just learning
Please help me.
Thank you
-- 
View this message in context: 
http://www.nabble.com/multiple-databases-tf4480719.html#a12776486
Sent from the SQLite mailing list archive at Nabble.com.


-
To unsubscribe, send email to [EMAIL PROTECTED]
-