RE: [sqlite] Trigger on Attached Database

2007-06-22 Thread Marc Ruff
Try to create a TEMPorary trigger after the ATTACH command.

Regards
Marc

>Is it possible to do this:
>
>   Open DB1
>
>   Attatch DB2
>
>
>In DB1 have a trigger that does
>
>  Insert into DB2. ?
>
>Theoretically it seems possible but we couldn't get it to work. Before I
>investigate further just want to know if it is possible
>
>Thanks.



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



AW: [sqlite] Trigger on Attached Database

2007-06-21 Thread Marc Ruff
Just forgot to mention:
Referencing in previous open/attached databases should also be possible with
foreign key constraints, when they will be enforced...

Marc

On Thu, 2007-06-21 at 11:57 +0200, Andre du Plessis wrote:
>> Is it possible to do this:
>> 
>>Open DB1
>> 
>>Attatch DB2
>> 
>> In DB1 have a trigger that does
>> 
>>   Insert into DB2. ?
>> 
>> Theoretically it seems possible but we couldn't get it to work. Before I
>> investigate further just want to know if it is possible

>No. A trigger may only reference objects in it's own database.
>You should be getting an error message along the lines of
>"cannot reference object in database XXX" when you create
>the trigger.
>
>Dan.
>

It would be very helpful to have the possibility creating a trigger in DB2
referencing DB1.
"Open DB1"
"Attach DB2" (DB2 has trigger: "Insert into DB1")

Of course, if just
"Open DB2" (DB2 has trigger: "Insert into DB1")
This would give an error.

Marc



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] Trigger on Attached Database

2007-06-21 Thread Marc Ruff


On Thu, 2007-06-21 at 11:57 +0200, Andre du Plessis wrote:
>> Is it possible to do this:
>> 
>>Open DB1
>> 
>>Attatch DB2
>> 
>> In DB1 have a trigger that does
>> 
>>   Insert into DB2. ?
>> 
>> Theoretically it seems possible but we couldn't get it to work. Before I
>> investigate further just want to know if it is possible

>No. A trigger may only reference objects in it's own database.
>You should be getting an error message along the lines of
>"cannot reference object in database XXX" when you create
>the trigger.
>
>Dan.
>

It would be very helpful to have the possibility creating a trigger in DB2
referencing DB1.
"Open DB1"
"Attach DB2" (DB2 has trigger: "Insert into DB1")

Of course, if just
"Open DB2" (DB2 has trigger: "Insert into DB1")
This would give an error.

Marc




-
To unsubscribe, send email to [EMAIL PROTECTED]

-



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] Re: What about Foreign Key support (when?)

2007-01-08 Thread Marc Ruff
* Aristotle Pagaltzis wrote:
>You can use triggers to enforce FKs until they are natively
enforced:
>http://www.justatheory.com/computers/databases/sqlite/foreign_key_triggers.
html
>http://www.rcs-comp.com/site/index.php/view/Utilities-SQLite_foreign_key_tr
igger_generator


Thanks for this info.
I had a look and found both not complete, but it is a good starting point.

We then need to write a utility to generate the triggers, they have to be
created automatically in our environment.
Because this would/will be a "nice" development effort, I was asking when to
expect fk support in sqlite, so our effort won't be in vain.
( I read "The Definitive Guide to SQLite" be Mike Owens [excellent], which
mentions the fk support to be expected end of 2006 )

Regards
 
Marc Ruff
 


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] What about Foreign Key support (when?)

2007-01-05 Thread Marc Ruff
>From "SQL Features That SQLite Does Not Implement":

 

"Those features near the top of the list are likely to be added in the near
future."

FOREIGN KEY constraints FOREIGN KEY constraints are parsed but are
not enforced

 

So next feature to expect is Foreign Key constraints!? Great!

When? Any plans yet?

 

 

Best regards

Marc Ruff



AW: [sqlite] sqlite shared-cache mode usage

2006-08-28 Thread Marc Ruff
Hi everybody,

I am in the same situation, wondering if two or more processes can access
the database if one of them is in shared-cache mode, e.g. one process act as
in test_server.c serving multiple clients, another process reads/writes the
database through the ODBC driver of C. Werner.

Thanks in advance.

Marc Ruff
 
-Ursprüngliche Nachricht-
Von: Jay Sprenkle [mailto:[EMAIL PROTECTED] 
Gesendet: Sonntag, 27. August 2006 19:07
An: sqlite-users@sqlite.org
Betreff: [sqlite] sqlite shared-cache mode usage

Good morning all,

I'm in the design stage of a project and had a question about sqlite
shared-cache mode.
The new version of firefox will use mozStorage, which is based on
sqlite using shared-cache mode. I want other programs to be able
read/write to the database but I was told this might
be a problem. Are there any issues with two completely separate
processes accessing
the database when in this mode? This will be important if other apps
want to read or
manipulate the downloaded files list or the bookmarks.

Thanks!


-
To unsubscribe, send email to [EMAIL PROTECTED]

-



-
To unsubscribe, send email to [EMAIL PROTECTED]
-