Re: [sqlite] Problem creating TRIGGER

2005-01-15 Thread Dan Kennedy
> > sqlite> CREATE TRIGGER dat.on_master_insert INSERT ON dat.master_table FOR > EACH ROW BEGIN INSERT > INTO dat.url_stats(new.file_name, '0', '0', '1'); END; > SQL error: near ".": syntax error > > The problem is near new.file_name, as when I access the database through a > C++ program while

[sqlite] wchar for sqlite prolem

2005-01-15 Thread LIN, Ming Q.
Hello, I am new to sqlite, I am using it for my unicode project in windows platform. In windows, Unicode uses wchar variable, but it looks like the sqlite only take char for parameters. Do anyone know how to store unicode (such as chinese, japanese) in sqlite. I am using visual studio 2003 and

Re: [sqlite] wchar for sqlite prolem

2005-01-15 Thread Will Leshner
On Sat, 15 Jan 2005 10:51:03 -0400, LIN, Ming Q. <[EMAIL PROTECTED]> wrote: > I am new to sqlite, I am using it for my unicode project in windows > platform. In windows, Unicode uses wchar variable, but it looks like the > sqlite only take char for parameters. Do anyone know how to store unicode

Re: [sqlite] wchar for sqlite prolem

2005-01-15 Thread Jeff Thompson
Hi, sqlite offers two versions of *most* functions that deal with text, a UTF-8 character version and a UTF-16 character version, for example: int sqlite3_prepare( sqlite3 *db,/* Database handle */ const char *zSql, /* SQL statement, UTF-8 encoded */ int nBytes,

[sqlite] recursive triggers thoughts

2005-01-15 Thread =?UTF-8?Q?Lothar_M=E4rkle?=
I recently step over a problem where recursive triggers are really helpfull, and realized that my idea for propagating changes along a tree structure won't work without recursive triggers obviously. In short, I think the server sql engines implement recursion limits because they are mulit-user.

[sqlite] BLOB data examples?

2005-01-15 Thread John Richard Moser
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The documentation at [1] is confusing me. Does anyone have a URI or such where I could see examples of code to set and read BLOB data? I feel I may be looking at this as too simple a task. . . [1] http://sqlite.org/capi3ref.html - -- All content

Re: [sqlite] Unique indexes

2005-01-15 Thread D. Richard Hipp
John Richard Moser wrote: If I create an index: CREATE UNIQUE INDEX packages_idx ON packages (category, class, grp, name, version); Will it be possible to have duplicates of individual columns, as long as all 5 don't match? Yes -- D. Richard Hipp -- [EMAIL PROTECTED] -- http://www.hwaci.com/drh/

[sqlite] Equivalent to MySQL MATCH() function?

2005-01-15 Thread Jeremy Tregunna
Is there such a thing (or a way to implement a) MATCH() like function as found in MySQL? What MATCH() does is it used for full text indexing and searching (matching columns declared in the MySQL FULLTEXT type when creating a table). If this same thing could possibly be done using SQLite, that

Re: [sqlite] BLOB data examples?

2005-01-15 Thread John Richard Moser
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 ok, screw it, I'm storing configuration files, policies, and POSIX ACLs, I'll figure out blobbing later; I've only mastered like 3 functions from SQLite's C API, so I've got other things to worry about. For now, base64 . . . John Richard Moser

Re: [sqlite] BLOB data examples?

2005-01-15 Thread Cory Nelson
You want to look at parameters, in particular the sqlite3_bind_* funcs. basically: sqlite3_prepare(..., "insert into foo values(?);", -1, , ...); sqlite3_bind_blob(stmt, 1, "bar", 3, SQLITE_TRANSIENT); sqlite3_step(stmt); On Sun, 16 Jan 2005 00:14:21 -0500, John Richard Moser <[EMAIL