External Program

Mark Mercer markm at woodjoint.ca
Fri Jun 10 19:11:45 EDT 2016


thanks Wm,

Lol yes I'm aware that if I go writing to the gnc db with an external 
prog it could result in tears.  My hope is I get it right from the 
beginning and its smooth sailing.  This is a brand new business startup 
so I don't have any old data to screw up.  As such I also don't have any 
"immediate" business to get done (that is unless I cant figure this out 
by Monday).  I did consider using the import files and I will likely go 
that route if this method doesn't work but it adds that extra step and a 
whole lot of shenanigans with remembering to import and having your code 
remember which records have already been exported.  It would be much 
simpler to bypass all that.

I'll read up on the links you gave me.  I'm just in the process now of 
putting together the gnucash file that aaron suggested so that he can 
help me out.

Thanks again.

Mark

On 10/06/2016 6:21 PM, Wm wrote:
> [FYI: This is a copy of a message posted to <news:gmane.comp.gnome.apps.gnucash.user> Message-ID: <1wl0ubhhw5w4r.dlg at tcnw81.tarrcity.invalid>]
>
> On Thu, 9 Jun 2016 20:04:53 -0230, in gmane.comp.gnome.apps.gnucash.user,
> Mark Mercer <markm at woodjoint.ca> wrote:
>
>> Thank you both for your replies.
>>
>> What I actually did was I went into gnucash and created a record in one
>> of the sections and then I opened up SQL workbench and looked through
>> the tables.  The record I created actually made entries in three or four
>> tables so I studied what each table was for which guid's pointed to
>> where and then duplicated the records in the database and assigned new
>> guid's that I made up.  I opened gnucash and it did not display the new
>> records that I created. Any idea's?  I must be missing something.
>>
>> I will use gnucash to enter most records but for these sales receipts I
>> think it will be a bit clunky.  I would rather create a robust app on my
>> own that can enter the data in a few clicks and selecting stuff from
>> dropdows etc.
>>
>> If you could help me a little further to get this working it would make
>> everything so much simpler for me.
>>
>> Thanks again.
> If you've an immediate business problem to solve get your external prog to
> create perfectly formed gnc import files, that way you can get on with
> doing the important stuff and solve any API issues at your leisure.
> Imports are only fiddly if you are doing them as a one off, done regularly
> they are efficient.
>
> Meanwhile if you're familiar with relational databases
> https://wiki.gnucash.org/wiki/images/8/86/Gnucash_erd.png
> can be a good starting point.
>
> I strongly recommend looking at Sebastien's work if you are going to be
> looking at gnc from an sql POV in a non-trivial way, start here:
>
> http://piecash.readthedocs.io/en/latest/tutorial/index_existing.html#other-objects
>
> Warning: discussion of writing to a gnc database in an unapproved way may
> result in tears.
>



More information about the gnucash-user mailing list