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
|
Private Sub Command4_Click()
Dim cnx As ADODB.Connection
Call Module1.Seconnecter(cnx)
cnx.Open
Dim cmd As ADODB.Command
Set cmd = New Command
Set cmd.ActiveConnection = cnx
cmd.CommandType = adCmdStoredProc
cmd.CommandText = "proc_facture_client2"
With cmd
.Parameters.Append .CreateParameter("num_cli", adInteger, adParamInput, Text10.Text)
End With
cmd.Execute
List2.AddItem (cmd.Parameters(1).Value)
cnx.Close
Set cmd = Nothing
Set cnx = Nothing
Script de la procédure
procedure proc_facture_client2 @numcli int
as
select libelle_prod
from produit, detail_vente, facture
where detail_vente.num_fact=facture.num_fact
and detail_vente.num_prod=produit.num_prod
and facture.num_cli = @numcli |
Partager