Re: [sqlite] Data structure for versioned data
Not quite the same issue, but I've set up triggers to generate a journal record whenever a record is added/changed/deleted from a table. This mechanism (triggers) could easily be used to generate a 'version' record. *** Doug F. John Stanton wrote: We perform some versioning by holding column material in XML and using RCS to maintain reverse deltas and versions. Samuel R. Neff wrote: Not specific to SQLite, but we're working on an app that needs to keep versioned data (i.e., the current values plus all previous values). The versioning is integral to the app so it's more than just an audit trail or history. Can anyone share experiences with the database structure for this type of requirement or point me to helpful resources? Thanks, Sam --- We're Hiring! Seeking a passionate developer to join our team building products. Position is in the Washington D.C. metro area. If interested contact [EMAIL PROTECTED] - To unsubscribe, send email to [EMAIL PROTECTED] - - To unsubscribe, send email to [EMAIL PROTECTED] - - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] help - sqlite3_get_table returns SQLITE_ROW?
I have a sqlite3_get_table query that sometimes returns error code 100 ( SQLITE_ROW). Can someone explain what condition would cause this - I didn't think that this return code would happen for this function, since it should fill up the 'results' table. The query sometimes works, sometimes not... this is in a 'busy' application, it is not clear what condition causes this return code. It is *possible* that there is a locking problem, but I would have expected a different code (e.g.: SQLITE_BUSY). There is only one process, and only one open connection to the database. The query does not return a large amount of data - 1 or 2 K at most. System resources (i.e.: memory and disk) are more than adequate for the task. Some additional information: This is sqlite version is 3.3.4. nrows and ncols are both 0. result does not appear to be set to 'real' data. sqlite3_errmsg(db) returns an empty string. Thanks *** Doug Fajardo
[sqlite] alter table syntax ?
Help! I keep getting a syntax error from the 'alter table' sql command, when used to add a column to a table. Can someone help with this error? Below is an example of one attempt, and its results: [tuna]$ sqlite test2.db SQLite version 2.8.16 Enter .help for instructions sqlite create table x1 ( name ); sqlite alter table x1 add column ( phone ); SQL error: near alter: syntax error sqlite