Bonjour,
J'ai mis en serveur une base de données postgres et un front end access.
La connexion entre les 2 se passe plutôt bien, mais j'ai un problème avec la connexion paramétrée pour les procédures en vba.
Les procédures marchent très bien sur mon PC, mais elles en fonctionnent pas sur les PC de mes collègues. Voici le message d'erreur qu'ils ont sur leur PC :
Voici la ligne surlignée par le débogage :
connection_postgres.Open connection_postgres_str
Les différentes machines ont le même driver d'installé.
Voici des exemples de connexion que j'ai essayé :
C'est surtout le point que ça marche sur mon PC et pas sur les autres qui me tracasse, je n'arrive pas à comprendre pourquoi. Avez-vous des idées ? Mes recherches ont été vaines...
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116 'MARCHE SUR MON ORDINATEUR MAIS PAS SUR LES AUTRES : 'Public Const connection_postgres_str As String = _ "DSN=PostgresCEM;" & _ "UID=user_name;" & _ "PWD=pwd;" & _ "Database=CEM" 'Public Const connection_postgres_str As String = _ "DSN=PostgresCEM;" & _ "DRIVER={PSQLODBC.DLL};" & _ "Server=10.27.180.7;" & _ "UID=user_name;" & _ "PWD=pwd;" & _ "Database=CEM" 'Public Const connection_postgres_str As String = _ "DSN=PostgresCEM;DATABASE=CEM;SERVER=10.27.180.7;PORT=5432;UID=user_name;PWD=pwd;CA=d;A6=;A7=100;B0=255;B1=8190;BI=0;C2=dd_;CX=1c2a1008b;A1=7.4-2" 'Public Const connection_postgres_str As String = _ "DSN=PostgresCEM;" & _ "UID=user_name;" & _ "DRIVER={PostgreSQL ANSI};" & _ "PWD=pwd;" & _ "Server=10.27.180.7;" & _ "Database=CEM" 'NE MARCHE NI SUR LE MIEN, NI SUR LES AUTRES : 'Public Const connection_postgres_str As String = _ "DRIVER={PostgreSQL ANSI};" & _ "DSN=PostgresCEM;" & _ "Server=10.27.180.7;" & _ "UID=user_name;" & _ "PWD=pwd;" & _ "Database=CEM" 'Public Const connection_postgres_str As String = _ "DRIVER={PostgreSQL ANSI};" & _ "Server=10.27.180.7;" & _ "PWD=pwd;" & _ "UID=user_name;" & _ "Database=CEM" 'Public Const connection_postgres_str As String = _ "DRIVER={PSQLODBC.DLL};" & _ "Server=10.27.180.7;" & _ "UID=user_name;" & _ "PWD=pwd;" & _ "Database=CEM" 'Public Const connection_postgres_str As String = _ "DRIVER={PSQLODBC35W.DLL};" & _ "Server=10.27.180.7;" & _ "UID=user_name;" & _ "PWD=pwd;" & _ "Database=CEM" 'Public Const connection_postgres_str As String = _ "DRIVER=PSQLODBC35W.DLL;" & _ "Server=10.27.180.7;" & _ "UID=user_name;" & _ "PWD=pwd;" & _ "Database=CEM" 'Public Const connection_postgres_str As String = _ "DRIVER={PSQLODBC35W.DLL};" & _ "Server=10.27.180.7;" & _ "DSN=PostgresCEM;" & _ "UID=user_name;" & _ "PWD=pwd;" & _ "Database=CEM" 'Public Const connection_postgres_str As String = _ "DRIVER={PSQLODBC30A.DLL};" & _ "Server=10.27.180.7;" & _ "UID=user_name;" & _ "PWD=pwd;" & _ "Database=CEM" 'Public Const connection_postgres_str As String = _ "DRIVER=PSQLODBC30A.DLL;" & _ "Server=10.27.180.7;" & _ "UID=user_name;" & _ "PWD=pwd;" & _ "Database=CEM" 'Public Const connection_postgres_str As String = _ "DRIVER={PSQLODBC30A.DLL};" & _ "Server=10.27.180.7;" & _ "DSN=PostgresCEM;" & _ "UID=user_name;" & _ "PWD=pwd;" & _ "Database=CEM" 'Public Const connection_postgres_str As String = _ "UID=user_name;" & _ "PWD=pwd;" & _ "DRIVER={PostgreSQL ANSI};" & _ "Server=10.27.180.7;" & _ "Database=CEM" 'Public Const connection_postgres_str As String = _ "DRIVER={PostgreSQL Unicode};" & _ "Server=10.27.180.7;" & _ "DSN=PostgresCEM;" & _ "UID=user_name;" & _ "PWD=pwd;" & _ "Database=CEM" 'Public Const connection_postgres_str As String = _ "DRIVER={PostgreSQL Unicode};" & _ "Server=10.27.180.7;" & _ "UID=user_name;" & _ "PWD=pwd;" & _ "Database=CEM" Sub test() Dim connection_postgres As ADODB.Connection Set connection_postgres = New ADODB.Connection connection_postgres.Open connection_postgres_str connection_postgres.Close Set connection_postgres = Nothing Stop End Sub
Merci d'avance,
Patrick
Partager