I think you should look at one of your other programs as an example.
What I see here is
SELECT
FETCH
When I should be seeing
DECLARE CURSOR
OPEN CURSOR
FETCH
CLOSE
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Art Tostaine, Jr.
Sent: Monday, April 8, 2019 11:41 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: SQL Fetch problem with BLOB
I'm trying to select all records in a file with BLOB's and transfer them via FTP to an imaging server. This previously worked fine but we are receiving a SQLSTT
428A1-Unable to access a file referenced by a file reference variable.
Code snips looks like this:
D Blob s SQLTYPE(BLOB_FILE)
EXEC SQL Select rid, dwLineNo, dwimg01
from dwImages
where dwsent = '1900-01-01 00:00:00';
EXEC SQL Fetch Next from C1 into :rid, :DwLineNo, :Blob;
Error in joblog
Message ID . . . . . . : SQL0452 Severity . . . . . . . : 30
Message type . . . . . : Diagnostic
Date sent . . . . . . : 04/08/19 Time sent . . . . . . :
11:33:48
Message . . . . : Unable to access a file that is referred to by a file
reference variable.
Cause . . . . . : The file referred to by the file reference variable
(host
variable 3) could not be accessed because of reason code 2. The reason codes
and their meanings are:
-- 2 - The length of the file name is greater than the maximum allowed
length.
-- If the reason code is 2, correct the file name and then try the request again.
If I look at the data the image file names look ok.
Thanks
--
Art Tostaine
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
https://amazon.midrange.com
As an Amazon Associate we earn from qualifying purchases.