× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Sorry cut and pasted wrong, here is the declare
EXEC SQL Declare C1 Cursor for
Select rid, dwLineNo, dwimg01
from dwImages
where dwsent = '1900-01-01 00:00:00';

EXEC SQL Open C1;

EXEC SQL Fetch Next from C1 into :rid, :DwLineNo, :Blob;

On Mon, Apr 8, 2019 at 11:44 AM Rob Berendt <rob@xxxxxxxxx> wrote:

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
--
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.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.