IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Forms Oracle Discussion :

Création de cookie avec Forms et/ou Webutil, est-ce possible ?


Sujet :

Forms Oracle

  1. #1
    Membre actif
    Profil pro
    Inscrit en
    Avril 2004
    Messages
    422
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Avril 2004
    Messages : 422
    Points : 201
    Points
    201
    Par défaut Création de cookie avec Forms et/ou Webutil, est-ce possible ?
    Bonjour,

    Comment créer et lire des valeurs dans un cookies via forms ?

    Est-ce possible ?

    Merci

  2. #2
    Membre averti
    Profil pro
    Inscrit en
    Août 2005
    Messages
    270
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2005
    Messages : 270
    Points : 342
    Points
    342
    Par défaut
    Ce n'est pas possible avec les outils de base (pl). C
    'est probablement possible avec un petit coup de java, je n'en sais rien.
    C'est certainement inutile : comme un utilisateur doit se connecter pour utiliser forms, s'il y a des infos "personnelles" à stocker, autant le faire dans la base.

  3. #3
    Invité
    Invité(e)
    Par défaut
    Sous 9i, j'ai les packages OWA_COOKIE et utl_http qui me semble gèrer les cookies.
    Ce sont des pistes, je n'ai jamais utilisé ça.

  4. #4
    Membre actif
    Profil pro
    Inscrit en
    Avril 2004
    Messages
    422
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Avril 2004
    Messages : 422
    Points : 201
    Points
    201
    Par défaut
    Avez-vous une tuto sur les owa_cookie ?

  5. #5
    Invité
    Invité(e)
    Par défaut
    Ça serait bien que tu nous donnes un jour la version de bd si tu veux que l'on soi cohérent avec ta bd...

    Pour ce qui est d'un tuto, j'ai juste la description du package, qui est souvent suffisante. Sinon je te laisse utiliser google.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    create or replace package OWA_COOKIE is
     
       -- These procedures/functions are merely wrappers around
       -- calls to send an HTTP_COOKIE and to get an HTTP_COOKIE.
       -- One should be familiar with the specification for
       -- HTTP cookies before attempting to use these subprograms.
     
       -- The HTTP specification for a COOKIE indicates that it
       -- cookie name/value pairs should not exceed 4k in size.
       type vc_arr is table of varchar2(4096) index by binary_integer;
     
       -- structure for cookies, as you could have multiple values
       -- associated with a single cookie name.
       type cookie is RECORD
       (
          name     varchar2(4096),
          vals     vc_arr,
          num_vals integer
       );
       -- Initializes the owa_cookie package variables (called by htp.init)
       procedure init;
     
       -- Calls to the procedure SEND generate an HTTP header line
       -- of the form:
       -- Set-Cookie: <name>=<value> expires=<expires> path=<path>
       --             domain=<domain> [secure]
       -- Only the name and value are required (as per the HTTP_COOKIE spec),
       -- and the default is non-secure.
       -- Calls to SEND must fall in the context of an OWA procedure's
       -- HTTP header output.  For example:
     
       -- begin
       --    owa_util.mime_header('text/html', FALSE);
       --                -- FALSE indicates not to close the header
       --    owa_cookie.send('ITEM1','SOCKS');
       --    owa_cookie.send('ITEM2','SHOES');
       --    owa_util.http_header_close;
       --
       --    -- Now output the page the user will see.
       --    htp.htmlOpen;
       --    <etc>
       procedure send(name    in varchar2,
                      value   in varchar2,
                      expires in date     DEFAULT NULL,
                      path    in varchar2 DEFAULT NULL,
                      domain  in varchar2 DEFAULT NULL,
                      secure  in varchar2 DEFAULT NULL);
     
       -- GET will return an OWA_COOKIE.COOKIE structure
       -- for the specified cookie name.
       function get(name in varchar2) return cookie;
     
       -- REMOVE will simply force the expiration of an existing cookie.
       -- This call must come within the context of an HTTP header.
       -- See the definition of SEND above.
       -- REMOVE generates a line which looks like:
       -- Set-Cookie: <name>=<value> expires=01-JAN-1990
       procedure remove(name in varchar2,
                        val  in varchar2,
                        path in varchar2 DEFAULT NULL);
     
       -- GET_ALL returns an array of name/value pairs of all HTTP_COOKIES
       -- sent from the browser.  The name/value pairs appear in the order
       -- that they were sent from the browser.
       procedure get_all(names    out vc_arr,
                         vals     out vc_arr,
                         num_vals out integer);
    end;

  6. #6
    Membre actif
    Profil pro
    Inscrit en
    Avril 2004
    Messages
    422
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Avril 2004
    Messages : 422
    Points : 201
    Points
    201
    Par défaut
    voici ma db

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
     
    select * from v$version
     
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bi    
    PL/SQL Release 10.2.0.2.0 - Production    
    CORE    10.2.0.2.0    Production    
    TNS for Solaris: Version 10.2.0.2.0 - Production    
    NLSRTL Version 10.2.0.2.0 - Production
    Cependant, à la lecture d'owa_cookie les exemples sont utilisés avec des procédure pl/sql pour le DAD.

    Moi je suis dans forms donc un applet, le dad c'est de l'html dynamique.

    Comment marié les 2 sans pour autant appeler une url pour stocker mon cookie ?

  7. #7
    Invité
    Invité(e)
    Par défaut
    Dans forms, tu utilises bien du PL/SQL ?

  8. #8
    Membre actif
    Profil pro
    Inscrit en
    Avril 2004
    Messages
    422
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Avril 2004
    Messages : 422
    Points : 201
    Points
    201
    Par défaut
    oui

Discussions similaires

  1. Image .jpg dans un ODS PDF avec MVS SAS 9.1, est-ce possible?
    Par DEMMAR dans le forum ODS et reporting
    Réponses: 2
    Dernier message: 21/09/2011, 15h13
  2. [XL-2007] ALEA.ENTRE.BORNE() avec des mots en résultats : Est ce possible ?
    Par kenycolasdu43 dans le forum Excel
    Réponses: 2
    Dernier message: 31/03/2011, 14h22
  3. [WD15] Tableau croisé avec une table en entrée est ce possible ?
    Par Therion dans le forum WinDev
    Réponses: 2
    Dernier message: 12/03/2010, 08h15
  4. [MCD] L' heritage avec de nombreux sous-types est ce possible
    Par slivzzz dans le forum Schéma
    Réponses: 4
    Dernier message: 21/11/2009, 02h35
  5. Réponses: 2
    Dernier message: 10/04/2007, 11h18

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo