[REBOL] Re: REBOL Relational Object-oriented Database
From: gjones05:mail:orion at: 22-Jun-2001 5:40
From: "Dr. Louis A. Turk"
> Is there an argument missing in the emit function below?
Hi, Louis,
Yes. I caught the mistake an hour after I sent the message and sent a second
message. I have reattached that message below. This emit technique is a slight
variation on Carl's suggestion to me once, so it is almost as good as coming
from "The Creator" (of REBOL, of course;-). I checked that this works, but I
used a diferent dataset so obviously I did more cutting than pasting when I
created the code for your structure. Sorry for the over site.
From: "GS Jones"
> > 6. How can data be exported from a database as a comma separated file.
>
> write %/path/to/my-csv-file "" ;to get fresh file
> emit: func [blk] [repend blk]
> forskip database 2 [
> csv-line: make string! 1000
> emit [{"} database/2/email {","} database/2/name {","} database/2/phone
> {","} database/2/web {"^/}]
> write/append %/path/to/my-csv-file csv-line
> ]
Whoops. Error...
emit: func [blk] [repend blk]
should be ...
emit: func [blk] [repend csv-line blk]
Sorry.
--Scott Jones