Salut, à ta place, je regarderai si on peut programmer une macro qui s'exécute à chaque fois à la fermeture* de ton fichier access (pour créer ton .txt), de cette façon, tu n'as plus qu'à gérer l'envoi de ton .txt en ligne et l'exécution de ton fichier .php pour la mise à jour de la base de données.
*edit : apparemment c'est jouable avec l'ajout d'un formulaire caché (reste à préparer la macro qui génère ton fichier .txt)
Citation :
Use the Close event of a form... you can't hook to the exit of a database directly. You could do this by having a form that opens hidden when the databse opens and then in the Close event of that form, you could have code that runs your macro. Since the form is hidden, it would only run when your database closes. > More importantly ensure it is the first form opened so that it will be the last form closed.
|
Si ça te parle, je suis tombé sur ça pour l'export
Citation :
To export a table into a text file: from macros: New in the first line put Macro Name Condition Action -------------------- ------------------ ---------------------- macro_export TransferText At the bottom: Transfer Type Export Delimited Specification Name Table Name YourTableName File Name C:\Folder\file.txt -> full path to your text file Has Fields Names Yes HTML Table Name Save the macro with the name macro_export You may run this mcro directly or from a form: Private Sub Command0_Click() DoCmd.RunMacro "macro_export" End Sub
|
Ou mieux, ça
http://www.generation-nt.com/vb-ex [...] 74461.html
Du coup, tu peux revenir à ton idée d'exporter tes données seulement lors de l'exécution d'un .bat (et enchaîner avec les autres étapes).
Message édité par blueteen le 06-05-2010 à 17:28:18