Re: [sqlite] Serialising memory DB
We do this in a very general way by running a comms program (actually a CGI process) which transforms the structure of the DB into XML and sends it to the client. The client knows the DTD so that it can parse it and write to its database, which does not have to be Sqlite. A simpler way would be for you to dump the database as SQL then execute the SQL at the destination. Also look at how the vacuum command works. JS Brandon, Nicholas (UK) wrote: Is there a way to serialise a memory DB so that it can be sent over a network socket and re-opened on another computer as a memory DB? I was thinking of using a SQLite table as a configuration system (like a .ini file) that can be sent over the network. Obviously you could use a file based DB instead and pass that around but I would like to be able to use memory DB for computers that either don't have hard drives or an OS that doesn't handle POSIX file operations (fopen et al). Regards Nick This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person.
Re: [sqlite] Serialising memory DB
--- "Brandon, Nicholas (UK)" <[EMAIL PROTECTED]> wrote: > > Is there a way to serialise a memory DB so that it > can be sent over a > network socket and re-opened on another computer as > a memory DB? > > I was thinking of using a SQLite table as a > configuration system (like a > .ini file) that can be sent over the network. > Obviously you could use a > file based DB instead and pass that around but I > would like to be able > to use memory DB for computers that either don't > have hard drives or an I don't know if it will help you, but I've been working on something almost, but not completely unlike that here: http://sqlcached.sourceforge.net It's work in progress, it may explode if looked at harshly, etc. :) > OS that doesn't handle POSIX file operations (fopen > et al). If you have an OS that doesn't offer fopen() & similar functions at compile time, you'll probably have a hard time compiling anything using sqlite... __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: [sqlite] Serialising memory DB
On 5/10/06, Brandon, Nicholas (UK) <[EMAIL PROTECTED]> wrote: Is there a way to serialise a memory DB so that it can be sent over a network socket and re-opened on another computer as a memory DB? I was thinking of using a SQLite table as a configuration system (like a .ini file) that can be sent over the network. Obviously you could use a file based DB instead and pass that around but I would like to be able to use memory DB for computers that either don't have hard drives or an OS that doesn't handle POSIX file operations (fopen et al). Hey Nick, did you consider an RPC call to a computer that will act as the 'config server'?
Re: [sqlite] Serialising memory DB
> Is there a way to serialise a memory DB so that it can be sent over a > network socket and re-opened on another computer as a memory DB? search for '"dump"' and run_schema_dump_query in sqlite/src/shell.c __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
[sqlite] Serialising memory DB
Is there a way to serialise a memory DB so that it can be sent over a network socket and re-opened on another computer as a memory DB? I was thinking of using a SQLite table as a configuration system (like a .ini file) that can be sent over the network. Obviously you could use a file based DB instead and pass that around but I would like to be able to use memory DB for computers that either don't have hard drives or an OS that doesn't handle POSIX file operations (fopen et al). Regards Nick This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person.