Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
In article <4arn8m$fmj@soap.news.pipex.net> deanh@Unipalm.Pipex.Com (Dean hobbs) writes:
>From: deanh@Unipalm.Pipex.Com (Dean hobbs)
>Subject: UNLOAD command in ESQL/C
>Date: 15 Dec 1995 11:47:34 GMT
>I am trying to write a program in ESQL/C that unloads data to a
>text file. I thought the easiest way to do this would be to use the
>SQL command UNLOAD. I can get it to work in dbaccess but I can't get it
>to work im my program (I get a syntax error). Can anybody tell me whether
>it is possible.
>Thanks in advance.
I had the same problem in a 4GL Environment. I also get the sqlerror -201.
The solution: You can write the statement within a system-command,
e.g. SYSTEM
echo "unload to mytable.txt select * from mytable" | dbaccess mydb
END
The syntax above is the 4GL-Syntax, but the code between SYSTEM and END
should work in every language.
Hope this helps,
Michael
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.