On 02/19/2013 05:00 PM, Stephen Chrzanowski wrote:
> My best suggestion would be to modify the code so when you compile the
> string to make the select/delete/update, it uses the table name.  For
> testing purposes, you could have a combo box, or text field, or a text file
> that has the contents to point to the table you need.

I hoped not to rewrite most of the statements...:( Too many to debug!

> Either that, copy your subject table to a memory table with the backup API,
> and run against that.  In one of my applications, I offer the user the
> choice to run the "database" from memory or from the drive directly.  When
> the application is run, it first reads the HDD file first, drops it to
> memory, works off memory, and when the application closes, it drops the
> data back to the drive.

Generally no. I have databases bigger than my RAM. And when I go public
with my application... I can't.

> (I'm sick - if that last sentence doesn't make sense, blame my kids and the
> meds! ;) )

(Everything you wrote made sense...)

It seems to me that the easiest way is to create a table "version" and
put some information into it.

> On Tue, Feb 19, 2013 at 10:37 AM, Patrik Nilsson
> <nipatriknils...@gmail.com>wrote:
> 
>> In my case I read the restriction of the triggers: I use database.table
>> and I insert with default values.
>>
>> I can't use triggers for this.
>>
>> /Patrik
>>
>> On 02/19/2013 04:27 PM, Dave McKee wrote:
>>>> Is it possible to use triggers for this?
>>>
>>> Yes.
>>>
>>> "Triggers may be created on views, as well as ordinary tables, by
>>> specifying INSTEAD OF in the CREATE TRIGGER statement. If one or more ON
>>> INSERT, ON DELETE or ON UPDATE triggers are defined on a view, then it is
>>> not an error to execute an INSERT, DELETE or UPDATE statement on the
>> view,
>>> respectively. Instead, executing an INSERT, DELETE or UPDATE on the view
>>> causes the associated triggers to fire. The real tables underlying the
>> view
>>> are not modified (except possibly explicitly, by a trigger program)."
>>>
>>> http://www.sqlite.org/lang_createtrigger.html
>>> _______________________________________________
>>> sqlite-users mailing list
>>> sqlite-users@sqlite.org
>>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>>
>> _______________________________________________
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> 
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to