1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| aRq = "INSERT INTO ordre_de_travail(IdDemande, TypeActivite, Ressource, date_debut, date_fin_prevue, date_fin_revisee, charge_prevue, charge_consommee_totale, charge_restante, libel_ot, ID_FORFAIT_BUDGET, charge_vendue_ot) "
aRq2 = aRq & "SELECT demande_ou_projet.IdDemande, 'RET', '" & aQui & "', null, null, null, '0', '0', '0', '"
aRq2 = aRq2 & aLibelle & "', demande_ou_projet.ref_forfait_budget, 'null' "
aRq3 = aRq2 & "FROM demande_ou_projet WHERE "
aRq3 = aRq3 & "demande_ou_projet.IdDemande = '" & Split(Me.NumDI, " ")(0) & "' "
aRq3 = aRq3 & "AND demande_ou_projet.type_demande IN ('EVO', 'GES', 'COR')"
Dim wrkODBC As DAO.Workspace
Dim bdd As DAO.Database
Set wrkODBC = CreateWorkspace(NomDuDSN, NomUtilisateur, MotDePasse, dbUseODBC)
Set bdd = wrkODBC.OpenDatabase("", , , "ODBC;DSN=" & NomDuDSN & ";OPTION=0;")
bdd.Execute aRq3 |
Partager