Hi Jon,
> I’ve got the dump and load working, but I have not yet figured out how
> to use the 'csv’ function for import from a file (I took a look at
The 'csv' function can only generate the CSV file (TAB-separated data).
It is not suitable for import.
To import a CSV file, you need to write proper code depending on the
data and the given situation. There are thousand possibilities of
input formats, character sets, type and order of data.
A simple example would be
(in "myAdrDB.csv"
(while (split (line) "^I")
(dbSync)
(let Obj (request '(+Prs) 'nm (pack (car L)))
(put> Obj 'adr (pack (cadr L)))
(put> Obj ...)
... )
(commit 'upd) ) )
> understand about the adrDump.l file, is the dotted pair after the
> (+Prs), as here: (obj (+Prs) (1 . 27)
This is the object ID encoded as a dotted pair (see the 'id' function).
'dump' is actually overkill for this simple address DB. It tries to find
a unique key for each object it dumps, so that references to this object
from other objects can be properly resolved.
The +Prs objects in the address DB don't have a unique key. And even the
object ID is not needed, because there are no references (+Link or
+Joint) from other objects.
So for this simple case, you can simply ignore the dotted pair.
♪♫ Alex
--
UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe