Re: [sqlite] DROP TABLE IF EXISTS foo does not seem to work via theC-API

2008-06-29 Thread Igor Tandetnik
"Stephen Woodbridge" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > DROP TABLE IF EXISTS foo; > > does not seem to work via the C-API. If I type it in sqlite3 it works > fine. > > When I tried via the C-API, I got the following: > > SQL: drop table if exists addr; > > SQL error:

Re: [sqlite] prepackaged sql statement

2008-06-29 Thread Igor Tandetnik
"Henrik Bechmann" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thanks Igor! And the SQL statement can be bound to parameters in the > usual ways? No, not in the view. You can, of course, select from the view (as if it were a table), and _that_ query can be parameterized. Igor

[sqlite] DROP TABLE IF EXISTS foo does not seem to work via the C-API

2008-06-29 Thread Stephen Woodbridge
Hi all, DROP TABLE IF EXISTS foo; does not seem to work via the C-API. If I type it in sqlite3 it works fine. When I tried via the C-API, I got the following: SQL: drop table if exists addr; SQL error: near "exists": syntax error My code is: strcpy(sql, "drop table if exists ");

Re: [sqlite] prepackaged sql statement

2008-06-29 Thread Henrik Bechmann
Thanks Igor! And the SQL statement can be bound to parameters in the usual ways? - Henrik Igor Tandetnik wrote: > "Henrik Bechmann" <[EMAIL PROTECTED]> > wrote in message news:[EMAIL PROTECTED] > >> The definition for SQLite CREATE VIEW refers to pre-packaged select >> statements. >> >>

Re: [sqlite] prepackaged sql statement

2008-06-29 Thread Igor Tandetnik
"Henrik Bechmann" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > The definition for SQLite CREATE VIEW refers to pre-packaged select > statements. > > What's the "pre-packaged" refer to? The view itself. A view is simply a way to name a SQL statement and save it in the database -

Re: [sqlite] Re ading an SQL file with C API

2008-06-29 Thread Igor Tandetnik
"c.panel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Is it possible to run an sql-statement file from C API that can > replace a ".read myfile.sql" command-line ? .read command itself is implemented in C code you can readily obtain. It uses public SQLite API, no black magic

Re: [sqlite] accessing the rowid of a blob for incremental IO

2008-06-29 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jeremy Hinegardner wrote: > SELECT name, blob FROM blobs WHERE name = $name; > > And the driver, under the covers uses the blob IO routines to retrieve > the blob data from SQLite when the user accesses the result set. To get the rowid it needs

Re: [sqlite] Update static database with records from memory database.

2008-06-29 Thread Igor Tandetnik
"Pejayuk" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Is it possible to have a single SQL query execute on the stats_static > stats database and have it update from the records in stats_memory > stats database?. http://www.sqlite.org/lang_attach.html Igor Tandetnik

[sqlite] Update static database with records from memory database.

2008-06-29 Thread Pejayuk
Hi, I'm new to sqlite. I use it on my Counter Strike Source Zombie Mod game server. I use eventscripts to access sqlite. In eventscripts you can open memory databases like so. es_xsql open stats_memory ":memory:" And static databases like so. es_xsql open stats_static |zmstats In the

[sqlite] accessing the rowid of a blob for incremental IO

2008-06-29 Thread Jeremy Hinegardner
Hi all, I'm working on getting the incremental Blob API into my Amalgalite ruby extension and I seem to have hit a roadblock. And it is probably my misunderstanding of something in SQLite. I want to have that whomever uses my SQLite wrapper be able to use the Blob IO, with minimal extra work.

[sqlite] Check out my Facebook profile

2008-06-29 Thread Feebe Monseta
I set up a Facebook profile where I can post my pictures, videos and events and I want to add you as a friend so you can see it. First, you need to join Facebook! Once you join, you can also create your own profile. Thanks, Feebe Here's the link:

[sqlite] Re ading an SQL file with C API

2008-06-29 Thread c.panel
Hello, Is it possible to run an sql-statement file from C API that can replace a ".read myfile.sql" command-line ? (preparing a statement require a 'char' pointer : giving the file in a large string is ok ?) thanks ! -- View this message in context:

[sqlite] prepackaged sql statement

2008-06-29 Thread Henrik Bechmann
The definition for SQLite CREATE VIEW refers to pre-packaged select statements. What's the "pre-packaged" refer to? Are the select statements named and stored, so that I can create a temporary named view from a prepared selection of named select statements, depending on (for instance) the

[sqlite] getting ROWID

2008-06-29 Thread c.panel
Hello, I execute a statement and want to have rowid(s) of each row like a : "select rowid,* from mytable;" how can I do this with C API ? thanks ! -- View this message in context: http://www.nabble.com/getting-ROWID-tp18183418p18183418.html Sent from the SQLite mailing list archive at

Re: [sqlite] Index and ORDER BY

2008-06-29 Thread Alexey Pechnikov
I try with this script on my laptop with 1 Gb RAM #!/usr/bin/tclsh package require sqlite3 sqlite3 db index_order.db db eval {DROP TABLE IF EXISTS events} db eval {CREATE TABLE events (eid INTEGER PRIMARY KEY)} db eval {CREATE INDEX ev_desc_idx ON events(eid desc)} db transaction { for