On vrijdag 7 oktober 2011, Glen Arason wrote: > Hello > > I've been evaluating GnuCash and think it will be perfect for my business > needs. > I'm using a MySQL db and looking at importing my customers using a sql > INSERT. > > My question relates to the "guid" field which is simply a varchar(32). > After testing a I have concluded that the giud needs to be a unique > "32-character hexadecimal number". > Since my customer id's are unique creating an MD5 hash of the customer id > sastisfies the above requirement. > > Is there any magic behind the programs guid's that won't be satisfied by an > MD5 hash? No, as long as the guid's are unique you should be ok. But note that the guid should not only be unique among your customers, but it should be unique among all the objects in your data file.
And you probably know already, but I have to formally tell you anyway: what you attempt (writing directly to the database outside of gnucash) is very much unsupported and can have unexpected results. Not all customer data is stored in the customers table. Parts are in the slots table, which is a bit of a black hole if you don't have the GnuCash business logic available to handle it. You may get away with it though and I'd be happy to hear about that as well, but be careful to test everything afterwards. Geert > > Thank you. > > Glen > > [email protected] > <mailto:[email protected]?subject=Domain%20Support> > http://www.CanadianDomainRegistry.ca > <http://www.canadiandomainregistry.ca/> > > Leduc/Edmonton Alberta > (780) 904-8759 > > _______________________________________________ > gnucash-devel mailing list > [email protected] > https://lists.gnucash.org/mailman/listinfo/gnucash-devel _______________________________________________ gnucash-devel mailing list [email protected] https://lists.gnucash.org/mailman/listinfo/gnucash-devel
