2.3.1: How to specify a DB on the command line

David Goodenough david.goodenough at linkchoose.co.uk
Mon Jun 8 10:56:02 EDT 2009


On Monday 08 June 2009, Phil Longstaff wrote:
> The general format of the datafile specification is:
>
> type://arguments
>
> similar to an http:// specification for a web URL.
>
> If "type://" is not specified, it defaults to "file://".
>
> Valid types are:
> file:// - argument is file name.  Tries to open as sqlite3 (if --enable-dbi
> included and sqlite3 dbi driver is available), otherwise falls back to
> current xml format (which may be compressed). sqlite3:// - argument is file
> name, type is sqlite3
> xml:// - argument is file name, type is current xml format (may be
> compressed) qsf:// - argument is file name, type is weird QSF XML format. 
> I know this exists for exporting (e.g. invoices), but I don't know how good
> support is for this. mysql:// - argument is host:dbname:username:password
> postgres:// - argument is host:dbname:username:password
>
> Examples:
>      my-file - opens my-file in current directory as sqlite3 file.  If it
> isn't a valid sqlite3 file, opens as current XML file format xml://my-file
> - opens my-file in current directory as current xml file format
> postgres://localhost:gnucash:myacct:mypasswd - opens postgres db on the
> local host.  Database name is gnucash.  Access account/password are
> "myacct" and "mypasswd".
>
> Phil
>
>
>
> ________________________________
> From: David Goodenough <david.goodenough at linkchoose.co.uk>
> To: gnucash-user at gnucash.org
> Sent: Monday, June 8, 2009 9:34:07 AM
> Subject: 2.3.1: How to specify a DB on the command line
>
> I notice that the command line allows me to specify the "datafile" that
> gnucash is to open.  Is there a form of this that would allow me to open
> a database from the command line?
>
> David
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

Thank you.

It might be good if this was added to the --help response.

David


More information about the gnucash-user mailing list