Précédent   Forum des professionnels en informatique > Bases de données > Autres SGBD > Informix
Informix Forum d'entraide Informix
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 19/11/2007, 11h28   #1
Invité de passage
 
Inscription : octobre 2006
Messages : 20
Détails du profil
Informations forums :
Inscription : octobre 2006
Messages : 20
Points : 4
Points : 4
Par défaut manipulation des tableaux




j'aimerais que vs mes chéres fréres m'aider a manipulé des tableau dans un programme avec informix 4GL. mon prob que c'est je parcours les donner avec un curseur mais l'affichage ca marche pas
quelqu un a des idees sur cette affaire ou bien une solution et merci bq


merci d'avance
amine556 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 26/11/2007, 10h13   #2
Membre confirmé
 
Avatar de blackstreet
 
Inscription : avril 2004
Messages : 268
Détails du profil
Informations forums :
Inscription : avril 2004
Messages : 268
Points : 236
Points : 236
Envoyer un message via MSN à blackstreet Envoyer un message via Yahoo à blackstreet
Pourrai tu nous expliquer comme t'a fais l'affichage,

- Est ce que c'est avec un DISPLAY?
- Est ce que c'est avec un INPUT?
- Est ce que t'a utilisé un Dynamic Array ou bien un simple Array?
blackstreet est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 26/11/2007, 12h55   #3
Invité de passage
 
Inscription : octobre 2006
Messages : 20
Détails du profil
Informations forums :
Inscription : octobre 2006
Messages : 20
Points : 4
Points : 4
Bonjour

j'ai travaille avec un simple array et j'ai fait l'affichage avec un DISPLAY ARRAY

ET merci bq
amine556 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 26/11/2007, 14h26   #4
Membre confirmé
 
Avatar de blackstreet
 
Inscription : avril 2004
Messages : 268
Détails du profil
Informations forums :
Inscription : avril 2004
Messages : 268
Points : 236
Points : 236
Envoyer un message via MSN à blackstreet Envoyer un message via Yahoo à blackstreet
Salut,

Pourrai tu mettre le morceau de code que t'a écris.

En plus, as tu vérifier la correspondance avec La forme?
blackstreet est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 26/11/2007, 15h20   #5
Invité de passage
 
Inscription : octobre 2006
Messages : 20
Détails du profil
Informations forums :
Inscription : octobre 2006
Messages : 20
Points : 4
Points : 4
Bonjour

voila un extrait de code input_info est une fonction qui permet de remplir le tableau dans mon form
voila le module
Code :
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
 
FUNCTION input_info()
 
   DEFINE  idx         SMALLINT,
           i           SMALLINT,
           b           SMALLINT,
           found_some  SMALLINT,
           sel_info    CHAR(500),
           sel_info2   CHAR(500)
   DEFINE tab_sto  ARRAY[32767] OF RECORD
                    pro_four   LIKE produit.pro_four ,
                    val_sto_PC decimal(16,2) ,
                    val_inst_acc decimal(16,2),
                    val_accepter CHAR(50),
                    val_detruit CHAR(50)
          END RECORD
       LET sel_info=" SELECT produit.pro_four,"
          ," sum(stock_avo.avo_qte_liv * stock_avo.avo_gross),"
          ," sum(fic_av_acc.gross * fic_av_acc.qt_a)"
          ," FROM  produit,stock_avo,fic_av_acc"
          ," WHERE produit.pro_code = stock_avo.avo_produit"
          ," AND produit.pro_code = fic_av_acc.code_pro"
          ," AND (stock_avo.avo_cause = 'P' OR stock_avo.avo_cause= 'C')"
          ," AND (fic_av_acc.valide = 'S')"
          ," AND " , q_stock CLIPPED
          ,"GROUP BY produit.pro_four"
 
     PREPARE requete_c FROM sel_info
     DECLARE c_info SCROLL CURSOR FOR requete_c
       OPEN c_info
        FETCH c_info INTO tab_ent_avoir[1].*
         LET found_some = 0
         LET i = 1
       FOREACH c_info INTO tab_ent_avoir[i].*
      LET tab_sto[i].pro_four = tab_ent_avoir[i].pro_four
            LET tab_sto[i].val_sto_PC = tab_ent_avoir[i].val_sto_PC
            LET tab_sto[i].val_inst_acc = tab_ent_avoir[i].val_inst_acc
 
              LET i = i + 1
        END FOREACH
LET sel_info2 =" SELECT sum(fic_av_acc.gross * fic_av_acc.qt_a), "
            ," sum(stock_avo.avo_qte_liv * stock_avo.avo_gross)"
 
          ," FROM fic_av_acc,stock_avo,produit"
           ," WHERE fic_av_acc.code_pro = produit.pro_code"
           ," AND stock_avo.avo_produit = produit.pro_code"
           ," AND fic_av_acc.valide= 'V' "
           ," AND ",q_stock CLIPPED
PREPARE requete_c2 FROM sel_info2
DECLARE c_info2 SCROLL CURSOR FOR requete_c2
      OPEN c_info2
       fETCH c_info2 INTO tab_ent_avoir[1].*
 
        FOREACH c_info2 INTO tab_ent_avoir[i].*
       LET tab_sto[i].val_accepter=tab_ent_avoir[i].val_accepter
       LET tab_sto[i].val_detruit = tab_ent_avoir[i].val_detruit
       LET b = b + 1
    END FOREACH
     CALL set_count(i-1)
       DISPLAY ARRAY tab_sto TO s_sto_avoir.*
 
       CLOSE c_info2
    CLOSE c_info
 
END FUNCTION
voila le code du form
Code :
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
 
DATABASE xxxxx
  SCREEN
 {
    +------------------------------------------------------------------------+
    |           Situation Avoir       Aujourd'huit le : [f005            ]   |
    |                                                                        |
    | Periode  :  [f000             ] [f001                ]                 |
    | Total Stock Avoir..:[f003          ]  Total Traité....:[f002          ]|
    |    Total P/C.......:[f004          ]     Insta daccept:[f006          ]|
    |    Total E/B.......:[f007          ]     Accepter.....:[f009          ]|
    |    Total Default...:[f008          ]     Detruit......:[f010          ]|
    +========================================================================+
    | Labo       Stock P/C     InstAccep       Accept       Destruction      |
    |  [f011 ]   [f012     ]   [f013     ]      [f014      ] [f015  ]        |
    |  [f011 ]   [f012     ]   [f013     ]      [f014      ] [f015  ]        |
    |  [f011 ]   [f012     ]   [f013     ]      [f014      ] [f015  ]        |
    |  [f011 ]   [f012     ]   [f013     ]      [f014      ] [f015  ]        |
    +========================================================================+
}
  TABLES
  stock_avo,
  produit
 
  ATTRIBUTES
 
     f000 = stock_avo.avo_date;
     f005 = formonly.date3;
     f001 = formonly.date2;
 
     f002 = formonly.av_acc1;
     f009 = formonly.av_acc2;
     f010 = formonly.fdetr1;
     f006 = formonly.av_acc3;
 
     f008 = formonly.avocause3 TYPE CHAR;
     f007 = formonly.avocause2 TYPE CHAR;
     f003 = formonly.Mant TYPE INTEGER;
     f004 = formonly.avocause1 TYPE CHAR;
 
     f011 = produit.pro_four;
     f012 = formonly.val_sto_PC TYPE decimal;
     f013 = formonly.val_inst_acc TYPE decimal;
     f014 = formonly.val_accepter TYPE decimal;
     f015 = formonly.val_detruit TYPE decimal;
 INSTRUCTIONS
   DELIMITERS " "
   screen record s_sto_avoir[4](produit.pro_four,
                                formonly.val_sto_PC,
                                formonly.val_inst_acc,
                                formonly.val_accepter,
                                formonly.val_detruit)
 END
amine556 est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 16h09.


 
 
 
 
Partenaires

Hébergement Web