Re: [sqlite] Persistent user-defined functions

2006-04-07 Thread John Stanton
Pam Greene wrote: I use sqlite3_create_function() to attach C++ functions to SQLite triggers. For example, I create the SQL function INSERT_HANDLER(), bound to the C++ function InsertTriggerHandler(). Then I create a trigger: CREATE TRIGGER trig AFTER INSERT ON TableName FOR EACH ROW WHE

Re: [sqlite] LIKE operator with prepared statements

2006-04-07 Thread drh
Eric Bohlman <[EMAIL PROTECTED]> wrote: > Dennis Cote wrote: > > You could also do this: > > SELECT x from y WHERE y.x LIKE '%' || ? || '%' ; > > > > The || operator concatenates the % characters with your string. Now you > > don't need to massage the string in the calling code. Six of one, hal

Re: [sqlite] LIKE operator with prepared statements

2006-04-07 Thread Eric Bohlman
Dennis Cote wrote: You could also do this: SELECT x from y WHERE y.x LIKE '%' || ? || '%' ; The || operator concatenates the % characters with your string. Now you don't need to massage the string in the calling code. Six of one, half dozen of the other. Note, though, that as currently imp

Re: [sqlite] Problem installing TCL bindings

2006-04-07 Thread Miguel Bazdresch
On 4/7/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > "Miguel Bazdresch" <[EMAIL PROTECTED]> wrote: > > I must be missing something obvious, but I can't figure out how to > > compile/install the tcl bindings. I've been trying to install > > sqlite-3.3.5 for the last few hours. > > The TEA (Tcl

Re: [sqlite] Persistent user-defined functions

2006-04-07 Thread Daniel Franke
On Friday 07 April 2006 22:39, Pam Greene wrote: > Is there any way to create a more broadly available, persistent custom > function, short of building it into sqlite? Or does anyone have > another suggestion to solve the implicit problem? Layering. Wrap sqlite3_* into your own set of functions.

Re: [sqlite] Persistent user-defined functions

2006-04-07 Thread Pam Greene
On 4/7/06, Jay Sprenkle <[EMAIL PROTECTED]> wrote: > On 4/7/06, Pam Greene <[EMAIL PROTECTED]> wrote: > > I use sqlite3_create_function() to attach C++ functions to SQLite > > triggers. For example, I create the SQL function INSERT_HANDLER(), > > bound to the C++ function InsertTriggerHandler().

Re: [sqlite] Persistent user-defined functions

2006-04-07 Thread Jay Sprenkle
On 4/7/06, Pam Greene <[EMAIL PROTECTED]> wrote: > I use sqlite3_create_function() to attach C++ functions to SQLite > triggers. For example, I create the SQL function INSERT_HANDLER(), > bound to the C++ function InsertTriggerHandler(). Then I create a > trigger: > > CREATE TRIGGER trig AFTER

[sqlite] Persistent user-defined functions

2006-04-07 Thread Pam Greene
I use sqlite3_create_function() to attach C++ functions to SQLite triggers. For example, I create the SQL function INSERT_HANDLER(), bound to the C++ function InsertTriggerHandler(). Then I create a trigger: CREATE TRIGGER trig AFTER INSERT ON TableName FOR EACH ROW WHEN (INSERT_HANDLER(ne

Re: [sqlite] How can I rename a column without ALTER COLUMN Command

2006-04-07 Thread Roman
Hi Dennis, I followed your path and managed to rebuild my table. All is well in the land of Roman now. Thanks again, Roman On Friday 07 April 2006 11:57 am, Dennis Cote wrote: > Roman wrote: > >http://sqlzoo.net/howto/source/z.dir/tip557646/i02create.xml > > > >says that such is not possible > >

Re: [sqlite] How can I rename a column without ALTER COLUMN Command

2006-04-07 Thread Dennis Cote
Roman wrote: http://sqlzoo.net/howto/source/z.dir/tip557646/i02create.xml says that such is not possible On Friday 07 April 2006 11:39 am, Roman wrote: I know that ALTER TABLE -> ALTER COLUMN is not supported by sqlite3. I misspelled a column name, and I am curious if there is a command t

Re: [sqlite] How can I rename a column without ALTER COLUMN Command

2006-04-07 Thread Alex Charyna
Here's what I might do, I'd be curious of the other's answers. You could use the .dump command, redirect it into a flat file Use sed to fix the field name in the file. Delete the old table. Then load it back in using the corrected dump file. -alex On Apr 7, 2006, at 10:39 AM, Roman wrote: I k

Re: [sqlite] How can I rename a column without ALTER COLUMN Command

2006-04-07 Thread Derrell . Lipman
Roman <[EMAIL PROTECTED]> writes: > I know that ALTER TABLE -> ALTER COLUMN is not supported by sqlite3. > > I misspelled a column name, and I am curious if there is a command to change > the name from sqlite3 interface. A bit simplistic, but: echo ".dump" | \ sqlite3 database.db | \ sed 's

Re: [sqlite] How can I rename a column without ALTER COLUMN Command

2006-04-07 Thread Roman
http://sqlzoo.net/howto/source/z.dir/tip557646/i02create.xml says that such is not possible On Friday 07 April 2006 11:39 am, Roman wrote: > I know that ALTER TABLE -> ALTER COLUMN is not supported by sqlite3. > > I misspelled a column name, and I am curious if there is a command to > change the

[sqlite] How can I rename a column without ALTER COLUMN Command

2006-04-07 Thread Roman
I know that ALTER TABLE -> ALTER COLUMN is not supported by sqlite3. I misspelled a column name, and I am curious if there is a command to change the name from sqlite3 interface. Thanks, RK

Re: [sqlite] LIKE operator with prepared statements

2006-04-07 Thread Dennis Cote
Marian Olteanu wrote: But why don't you use SELECT x from y WHERE y.x LIKE ? ; and bind the first parameter to "%SomeText%" instead of "SomeText" like before? Chad, You could also do this: SELECT x from y WHERE y.x LIKE '%' || ? || '%' ; The || operator concatenates the % characters wi

Re: [sqlite] www.sqlite.org Server setup

2006-04-07 Thread Jay Sprenkle
> >http://3dcanvas.tcl.tk :) > oops, html problem I think: A 3-D Canvas Widget For Tcl/Tk don't believe is valid there.

Re: [sqlite] www.sqlite.org Server setup

2006-04-07 Thread Christian Smith
On Fri, 7 Apr 2006, Dan Kennedy wrote: > >> The same virtual server hosts multiple websites. Besides >> SQLite it hosts: >> >>http://www.cvstrac.org/ >>http://canvas3d.tcl.tk/ >>http://tkhtml.tcl.tk/ > >http://3dcanvas.tcl.tk :) Mmmm, triangles:) > > >_

Re: [sqlite] www.sqlite.org Server setup

2006-04-07 Thread Dan Kennedy
> The same virtual server hosts multiple websites. Besides > SQLite it hosts: > >http://www.cvstrac.org/ >http://canvas3d.tcl.tk/ >http://tkhtml.tcl.tk/ http://3dcanvas.tcl.tk :) __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the

Re: [sqlite] about deletion

2006-04-07 Thread Dan Kennedy
In general, a journal is created when executing a DELETE statement. Guarantees of atomicity etc. (ACID) are the same as for an INSERT. Dan. --- chetana bhargav <[EMAIL PROTECTED]> wrote: > Hi, > > I just want to know how rows are deleted, its same like insertion where we > create journal

Re: [sqlite] Problem installing TCL bindings

2006-04-07 Thread drh
"Miguel Bazdresch" <[EMAIL PROTECTED]> wrote: > Hello, > > I must be missing something obvious, but I can't figure out how to > compile/install the tcl bindings. I've been trying to install > sqlite-3.3.5 for the last few hours. > The TEA (Tcl Extension Architecture) package from the download pa

[sqlite] about deletion

2006-04-07 Thread chetana bhargav
Hi, I just want to know how rows are deleted, its same like insertion where we create journal? -x- - Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2ยข/min or less.