1ericire
Messages postés2Date d'inscriptionmercredi 12 août 2020StatutMembreDernière intervention13 août 2020
-
Modifié le 13 août 2020 à 09:54
1ericire
Messages postés2Date d'inscriptionmercredi 12 août 2020StatutMembreDernière intervention13 août 2020
-
13 août 2020 à 08:25
Bonjour,
ce code fonctionne bien directement dans la console dos mais pas en vbs
"""C:\Program Files\QGIS 2.18\OSGeo4W.bat""" psql --host=xx.xx.x.x --username=xxx -w --dbname=xxx--command="SELECT code_tranche FROM xx.xx WHERE code_tranche='D134835-1';" > "logpath.txt"
le vbs
Set fso = CreateObject("Scripting.FileSystemObject")
set shl = createobject("wscript.shell")
shl.run "cmd.exe /c """"""C:\Program Files\QGIS 2.18\OSGeo4W.bat"""""" psql --host=xx.xx.x.xx --username=xxx -w --dbname=xxx --command=""SELECT code_tranche FROM xx.xx WHERE code_tranche='D134835-1';"" > ""logpath.txt.txt""" ,0,true
1ericire
Messages postés2Date d'inscriptionmercredi 12 août 2020StatutMembreDernière intervention13 août 2020 13 août 2020 à 08:25
bonjour
après des dizaines d'essais, ceci marche mais je n'en comprends pas la logique.
c'est surtout le """"""""""""C:\Program Files\QGIS 2.18\OSGeo4W.bat"""""""""" qui m'échappe.
Si quelqu'un pouvait m'expliquer la logique svp
Set fso = CreateObject("Scripting.FileSystemObject")
set shl = createobject("wscript.shell")
shl.run "cmd.exe /c """"""""""""C:\Program Files\QGIS 2.18\OSGeo4W.bat"""""""""" psql --host=xx.xx.x.x --username=x -w --dbname=x --command=""SELECT code_tranche FROM x.x WHERE code_tranche='D134835-1';"" > ""logPath.txt""",0,true