* SQL*Module: selecting an Oracle LONG datatype into Ada
@ 1997-08-07 0:00 ltost
0 siblings, 0 replies; only message in thread
From: ltost @ 1997-08-07 0:00 UTC (permalink / raw)
We're trying to select an Oracle LONG datatype into an Ada variable
using
SQL*Module. When we do a select that should return either 0 or 1 row,
we
get an SQL error of -932 (which sounds like incompatible datatypes
from
the error text).
Here's the DECLARE CURSOR:
DECLARE cursor_t_policy CURSOR FOR
SELECT b.policy_text
FROM sac.t_plcy_idx a,
sac.t_plcytext b
WHERE to_char(a.effective_date) = to_char(sysdate)
AND b.policy_key = a.policy_key
...and here's the FETCH:
PROCEDURE Fetch_t_policy_data (
:policy_text CHARACTER(8192),
SQLCODE);
FETCH cursor_t_policy
INTO :policy_text;
(8192 bytes is more than big enough for our purposes, but remember
that
the LONG in Oracle is <= 2 Gb).
The open cursor works, but the fetch returns -932.
The variable we're putting it into is declared in Ada as:
Policy_Text : Sql_Standard.Char (1 .. 8192);
(we tried it declared as Ada's CHAR with the same results).
Sqlcode : Sql_Standard.Sqlcode_Type := 0;
And the call to fetch looks like:
Gtp.Fetch_T_Policy_Data (Policy_Text, Sqlcode);
Any ideas?
Thanks.
Please email your response... news service isn't great here.
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1997-08-07 0:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-08-07 0:00 SQL*Module: selecting an Oracle LONG datatype into Ada ltost
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox