Re: [sqlite] Can I use sqlite3_bind for colmun name or ASC/DESCselector?

2008-10-25 Thread mfujisaw
Filip, Igor, Thanks for your quick reply and help! I could understand the behavior of binding. I will try to make SQL without binding for these scenarios. Thanks again! minoru 2008/10/26 Igor Tandetnik <[EMAIL PROTECTED]>: > "mfujisaw" <[EMAIL PROTECTED]> wrote in > message > news:[EMAIL PROTEC

Re: [sqlite] Can I use sqlite3_bind for colmun name or ASC/DESCselector?

2008-10-25 Thread Igor Tandetnik
"mfujisaw" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I am developping allication with SQLite3 functions. > When I will use sqlite3_bind and wild card for some SQL, it wouldn't > work well. > > 1. SELECT ? FROM records WHERE age=30 > I want to set some table name into ? every tim

Re: [sqlite] rtree cast warnings on 64bit OS - strange parameter use

2008-10-25 Thread Michael Ruck
I just wanted to explain the reason of the warning. There's valid reason to emit these warnings as the compiler can not infer the usage from static type analysis. I did not specifically call this use wrong. Mike Am 25.10.2008 um 19:44 schrieb D. Richard Hipp: > > On Oct 25, 2008, at 1:28 PM,

Re: [sqlite] rtree cast warnings on 64bit OS - strange parameter use

2008-10-25 Thread D. Richard Hipp
On Oct 25, 2008, at 1:28 PM, Michael Ruck wrote: > The problem with these types of C tricks is that they only work > right if the > platform they're used on has the property of sizeof(void*) == > sizeof(int). > Unfortunately this is not always the case and not mandated by the C > standard. Th

Re: [sqlite] converting mdb to sqlite using mdbtools

2008-10-25 Thread Muayyad AlSadi
thanks ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] rtree cast warnings on 64bit OS - strange parameter use

2008-10-25 Thread Michael Ruck
The problem with these types of C tricks is that they only work right if the platform they're used on has the property of sizeof(void*) == sizeof(int). Unfortunately this is not always the case and not mandated by the C standard. That's the reason for these warnings. Its also a reason not to turn o

Re: [sqlite] rtree cast warnings on 64bit OS - strange parameter use

2008-10-25 Thread Dan
On Oct 25, 2008, at 11:40 PM, William Kyngesburye wrote: > I added rtree to my sqlite compilation for the first time and got > these warnings for OSX 64bit: > > /Users/Shared/src/sqlite/sqlite-3.6.4/sqlite3.c: In function > ‘rtreeCreate’: > /Users/Shared/src/sqlite/sqlite-3.6.4/sqlite3.c:94784: w

Re: [sqlite] Can I use sqlite3_bind for colmun name or ASC/DESC selector?

2008-10-25 Thread Filip Navara
No, it's impossible. The main idea of prepared statements and binding is that the statement has to be compiled only once into the virtual machine code that is then executed when you run sqlite3_step. This works only as long as the compiled form isn't affected by the bound data. Binding column names

[sqlite] Can I use sqlite3_bind for colmun name or ASC/DESC selector?

2008-10-25 Thread mfujisaw
Hi, guys, I am developping allication with SQLite3 functions. When I will use sqlite3_bind and wild card for some SQL, it wouldn't work well. 1. SELECT ? FROM records WHERE age=30 I want to set some table name into ? every time. 2. SELECT * FROM records WHERE age=30 ORDER BY ? I want to set some

Re: [sqlite] setting the timezone on windows xp

2008-10-25 Thread Doug
Hi Jay -- I used to have a problem like this a few years back. I don't remember all the hows and whys, but my apps call the following at start up and the problems are gone: _tsetlocale(LC_ALL, _T("")); _tzset(); HTH Doug > -Original Message- > From: [EMAIL PROTECTED] [mailto:sqlite-u

[sqlite] rtree cast warnings on 64bit OS - strange parameter use

2008-10-25 Thread William Kyngesburye
I added rtree to my sqlite compilation for the first time and got these warnings for OSX 64bit: /Users/Shared/src/sqlite/sqlite-3.6.4/sqlite3.c: In function ‘rtreeCreate’: /Users/Shared/src/sqlite/sqlite-3.6.4/sqlite3.c:94784: warning: cast from pointer to integer of different size /Users/Sh

[sqlite] Segfault in initialiazation

2008-10-25 Thread Marian Aldenhoevel
Hi, I am trying to add sqllite3 to a C-Program to replace a hand-made on-disk-datastructure that has proven to be cumbersome to change and inefficient. Unfortunately the program crashes very early in the initialization before the first line of my own code executes, making the problem difficul

Re: [sqlite] converting mdb to sqlite using mdbtools

2008-10-25 Thread Kees Nuyt
On Sat, 25 Oct 2008 18:32:20 +0300, "Muayyad AlSadi" <[EMAIL PROTECTED]> wrote in General Discussion of SQLite Database : >I wrote an article which can be found here >http://www.cltb.net/en/articles/mdb2sqlite.html > >please update the note on http://www.sqlite.org/cvstrac/wiki?p=ConverterTools >w

[sqlite] converting mdb to sqlite using mdbtools

2008-10-25 Thread Muayyad AlSadi
I wrote an article which can be found here http://www.cltb.net/en/articles/mdb2sqlite.html please update the note on http://www.sqlite.org/cvstrac/wiki?p=ConverterTools which says Note: I don't think it supports SQLite right now, but this project can be continued and used for that purpose. to poi

[sqlite] setting the timezone on windows xp

2008-10-25 Thread Jay Sprenkle
Hello all, this isn't really an sqlite question but it tangentially touches on it. Please disregard it if it offends. I'm trying to write an atom feed exporter for my sqlite database and I need to export the utc time. My development box, windows xp, insists (both in C and in SQLite) that UTC is 10

Re: [sqlite] how to add multiple columns at a time

2008-10-25 Thread Igor Tandetnik
"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I want to add multiple columns, the following works for only one > column: > > ALTER TABLE Data ADD COLUMN Password TEXT Just run ALTER TABLE once for each column you want to add. Igor Tandetnik

[sqlite] how to add multiple columns at a time

2008-10-25 Thread 灵感之源
Hi, I want to add multiple columns, the following works for only one column: ALTER TABLE Data ADD COLUMN Password TEXT but not this: ALTER TABLE Data ADD COLUMN (Password TEXT, User TEXT) nor this: ALTER TABLE Data ADD (Password TEXT, User TEXT) --

Re: [sqlite] Sqlite3 delete action is too slow

2008-10-25 Thread Igor Tandetnik
"yhuang" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I create a DB and only one table in the DB. There are 3641043 records > in the DB file. Min id is 27081364, Max id is 30902585. > > I did follow operation: > > sqlite> delete from XXX where userId>3090 and userId<30902000; >

[sqlite] Success in extending genfkey

2008-10-25 Thread elbart0
Hello, If you are interested, i successfully extended the genfkey tool to make sure all declared foreign keys have an associated index. Tables 'temp.idx2' and 'temp.idx' cannot be reused because of the 'il.isunique' clause... Thanks Dan for your response in the previous post. Thanks all for your

[sqlite] Sqlite3 delete action is too slow

2008-10-25 Thread yhuang
I create a DB and only one table in the DB. There are 3641043 records in the DB file. Min id is 27081364, Max id is 30902585. I did follow operation: sqlite> delete from XXX where userId>3090 and userId<30902000; took 1’32’’ sqlite> delete from XXX where userId>2900 and userId<29902