Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CursorAdapter and Oracle high precision numbers
Message
 
 
À
10/06/2005 05:50:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01021414
Message ID:
01022158
Vues:
18
>With each test I do it is looking worse. Even this query fails exactly in the same way :
select CAST(COUNT(*) AS NUMBER(10)) AS extent_number from user_extents
>What is the problem with this CursorAdapter ?

It is not the CA. IMO, it is the provider. I have this same problem when trying to use the "auto-refresh" features of the CA in VFP9 to get the PK of a newly inserted record by retrieving the value of the CurrVal of a sequence. I got this working by creating then calling a package procedure in Oracle. The package script looks like:
CREATE OR REPLACE PACKAGE GetCurrentID AS
   TYPE t_RefCur IS REF CURSOR;
  FUNCTION GetCurrVal(p_SeqName IN VARCHAR2)
   RETURN t_RefCur;
END;
/
show error
CREATE OR REPLACE PACKAGE BODY GetCurrentID AS
  FUNCTION GetCurrVal(p_SeqName IN VARCHAR2)
    RETURN t_RefCur IS
    v_ReturnCursor t_RefCur;
    v_SQLStatement VARCHAR2(200);
  BEGIN
    v_SQLStatement := 'select cast(' || p_SeqName || '.CurrVal AS NUMBER(8,0)) as KeyID FROM Dual';
    OPEN v_ReturnCursor FOR v_SQLStatement;
    RETURN v_ReturnCursor;
  END;
END;
/
show error
The VFP code for the following CA property (new in VFP9) looks like:
INSERTCMDREFRESHCMD = [{CALL GetCurrentID.GetCurrVal('s_sequence_name_here')}]
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform