Re: [sqlite] Retrieving data

2006-09-13 Thread thomas . l
Am 14.09.2006 um 02:11 Uhr haben Sie geschrieben: > I'm using sqlite in VC++ 2005. > When I started this I knew nothing about sqlite or indeed SQL at all so its > been tough going trying to work out how this all works. I started so too ;-) > I tried: > sqlite3_exec(AccDataBase,"SELECT

Re: [sqlite] trigger and schema error

2006-09-13 Thread drh
chetana bhargav <[EMAIL PROTECTED]> wrote: > Hi, > > Wanted to conform once, I am caching some of the prepared statements in > memory, now if some one adds a trigger to another table in the same DB. Do we > still get schema change error. > Yes. -- D. Richard Hipp <[EMAIL PROTECTED]>

[sqlite] Retrieving data

2006-09-13 Thread Richard Stern
Hi all. I'm using sqlite in VC++ 2005. When I started this I knew nothing about sqlite or indeed SQL at all so its been tough going trying to work out how this all works. So far I have created a database and a table and added columns and rows filled with data. But I'm having trouble retrieving

[sqlite] trigger and schema error

2006-09-13 Thread chetana bhargav
Hi, Wanted to conform once, I am caching some of the prepared statements in memory, now if some one adds a trigger to another table in the same DB. Do we still get schema change error. -Chetan - Do you Yahoo!? Everyone is raving

Re: [sqlite] Very wide tables and performance

2006-09-13 Thread jose simas
Thanks for your answers! I am very happy with SQLite as it is I was just wondering if I could improve it for this case. I am using tables with this configuration for performance reasons. I have to support an indeterminate number of columns (user data) and a "normal" design is not as fast as this

Re: [sqlite] Very wide tables and performance

2006-09-13 Thread Dennis Cote
jose simas wrote: My application uses SQLite as its file format and up to two of the tables can have several thousand columns (up to 20 or 30 thousand at times). When I open a connection there's a noticeable pause (around one second on a file with a table of 7,000 columns, for example). There

Re: [sqlite] Very wide tables and performance

2006-09-13 Thread drh
"jose simas" <[EMAIL PROTECTED]> wrote: > > When I open a connection there's a noticeable pause (around one second > on a file with a table of 7,000 columns, for example). There is also a > noticeable delay in sorting them by the primary key. > While there is no limit to the number of columns

[sqlite] Very wide tables and performance

2006-09-13 Thread jose simas
Hi, My application uses SQLite as its file format and up to two of the tables can have several thousand columns (up to 20 or 30 thousand at times). When I open a connection there's a noticeable pause (around one second on a file with a table of 7,000 columns, for example). There is also a

Re: [sqlite] Inserting Values in Bulk

2006-09-13 Thread Rich Shepard
On Wed, 13 Sep 2006, Pablo Santacruz wrote: Try this, it may suits you. Thank you, Pablo. I think that it is OK now; I'm in the process of testing the method by working within pycrust. I've made the input data into an array of lists rather than tuples, and that will also work. Rich --

Re: [sqlite] Inserting Values in Bulk

2006-09-13 Thread Pablo Santacruz
Try this, it may suits you. (I'm using pysqlite from trac) from pysqlite2 import dbapi2 as sqlite import csv con = sqlite.connect("mydb") cursor = con.cursor() reader = csv.reader(open("some.csv", "rb")) qmarks = "?," * 30 + "?" #1 for row in reader: #row is a tuple cursor.execute("insert

Re: [sqlite] no TRUNCATE

2006-09-13 Thread Christian Smith
P Kishor uttered: looking at the SQL supported by SQLite, I see no mention of TRUNCATE. Not in the SQL clauses supported, nor in the clauses omitted. Is TRUNCATE a weird beast? I don't think it's standard SQL. At least not SQL92 that SQLite aims to implement. TRUNCATE is an optimised

[sqlite] no TRUNCATE

2006-09-13 Thread P Kishor
looking at the SQL supported by SQLite, I see no mention of TRUNCATE. Not in the SQL clauses supported, nor in the clauses omitted. Is TRUNCATE a weird beast? -- Puneet Kishor http://punkish.eidesis.org/ Nelson Inst. for Env. Studies, UW-Madison http://www.ies.wisc.edu/ Open Source Geospatial

Re: [sqlite] strange behavior of "<" and ">" operator

2006-09-13 Thread Andrea Federico Grisotto
postgres=# SELECT * from np WHERE (42>=fromId) AND (42<=toId); fromid | toid | serviceid +--+--- 40 | 43 | 3 (1 row) please forget it,this an error. - To unsubscribe, send email

Re: [sqlite] strange behavior of "<" and ">" operator

2006-09-13 Thread davep
>> You will be told MySQL doesn't set the standard :-) > the same query in postgresql have have same result of Mysql. And nor does Postgresql. > Mysql and postgresql have the same behavior and sqlite is different. > > what do you think about this? > where I am mistaking? You are making a mistake

Re: [sqlite] strange behavior of "<" and ">" operator

2006-09-13 Thread Andrea Federico Grisotto
[EMAIL PROTECTED] wrote: fromIdVARCHAR(6), toId VARCHAR(6), excuse me, this was a stupid question: *fromId* and *toId* are VARCHAR, if I use *int* the behavior is correct, excuse me again, but remain the difference behavior between sqlite and Mysql. You will

Re: [sqlite] reg:BOLB data

2006-09-13 Thread Gerry Snyder
sandhya wrote: Hi, I created a table with fileds filename and the value of type text and BLOB respectively... I stored a file and checked whether it is existing or not from command prompt with sqlite3 exe..It is displaying but the problem is i can able to see the whole content of the file

Re: [sqlite] strange behavior of "<" and ">" operator

2006-09-13 Thread Mario Frasca
Andrea Federico Grisotto wrote: *fromId* and *toId* are VARCHAR, if I use *int* the behavior is correct, excuse me again, but remain the difference behavior between sqlite and Mysql. just food for thought: when you're asking an ambiguous question (like in the case of comparing apples with

Re: [sqlite] strange behavior of "<" and ">" operator

2006-09-13 Thread davep
> >> fromIdVARCHAR(6), >> toId VARCHAR(6), > > excuse me, this was a stupid question: > *fromId* and *toId* are VARCHAR, if I use *int* the behavior is correct, > excuse me again, but remain the difference behavior between sqlite and > Mysql. You will be told MySQL doesn't

Re: [sqlite] strange behavior of "<" and ">" operator

2006-09-13 Thread Andrea Federico Grisotto
fromIdVARCHAR(6), toId VARCHAR(6), excuse me, this was a stupid question: *fromId* and *toId* are VARCHAR, if I use *int* the behavior is correct, excuse me again, but remain the difference behavior between sqlite and Mysql. bye Andrea.

[sqlite] Re: strange behavior of "<" and ">" operator

2006-09-13 Thread Igor Tandetnik
Andrea Federico Grisotto <[EMAIL PROTECTED]> wrote: CREATE TABLE np ( fromIdVARCHAR(6), toId VARCHAR(6), serviceId INTEGER, PRIMARY KEY (fromId, toId) ); if I run this query in *sqlite version 3.3.6* I obtain (two rows): sqlite> SELECT * from np WHERE (42>=fromId)

[sqlite] strange behavior of "<" and ">" operator

2006-09-13 Thread Andrea Federico Grisotto
I have a table like this: CREATE TABLE np ( fromIdVARCHAR(6), toId VARCHAR(6), serviceId INTEGER, PRIMARY KEY (fromId, toId) ); and I insert these values: INSERT INTO np VALUES ( 0, 5, 2); INSERT INTO np VALUES ( 40, 43, 3); INSERT INTO np VALUES (440,499, 3);

[sqlite] reg:BOLB data

2006-09-13 Thread sandhya
Hi, I created a table with fileds filename and the value of type text and BLOB respectively... I stored a file and checked whether it is existing or not from command prompt with sqlite3 exe..It is displaying but the problem is i can able to see the whole content of the file which i stored.

Re: [sqlite] HexValues

2006-09-13 Thread Vivien Malerba
On 9/12/06, guy12 <[EMAIL PROTECTED]> wrote: hi, i need to insert hex values in the data base and after that i have to select them again ... what's the best way for doing that ?? i first used INTERGER for that but i think that is the wrong way... p.s. i need to accress the db through my