From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f99a8,1772e2f66d2dcf7f,start X-Google-Attributes: gidf99a8,public X-Google-Thread: 103376,1772e2f66d2dcf7f,start X-Google-Attributes: gid103376,public From: ltost@systemautomation.com Subject: SQL*Module: selecting an Oracle LONG datatype into Ada Date: 1997/08/07 Message-ID: <870962945.1073@dejanews.com>#1/1 X-Deja-AN: 262740367 X-Http-User-Agent: Mozilla/3.0 (Win95; I) X-Originating-IP-Addr: 206.181.110.2 (systemautomation.com) Organization: Deja News Posting Service X-Authenticated-Sender: ltost@systemautomation.com X-Article-Creation-Date: Thu Aug 07 14:09:07 1997 GMT Newsgroups: comp.databases.oracle.misc,comp.lang.ada Date: 1997-08-07T00:00:00+00:00 List-Id: 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