Bonjour,

J'essaye de faire fonctionner en local un site (qui fonctionne très bien en ligne), mais j'obtiens toujours le message suivant :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
Erreur n° -2147467259 lors de la connection à la base de données.
Erreur de compilation Microsoft VBScript error '800a0401'
Fin d'instruction attendue
/iisHelp/common/500-100.asp, line 11
Dim objASPError, blnErrorWritten, strServername, strServerIP, strRemoteIP Dim strMethod, lngPos, datNow, strQueryString, strURL
--------------------------------------------------------------------------^
ADODB.Recordset error '800a0e7d'
Impossible d'utiliser cette connexion pour effectuer cette opération. Elle est fermée ou non valide dans ce contexte.
/regalb2007/asp.inc/dynhtml/articlesliste.asp, line 84
Voici le code pour la connexion à la BdD :

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
 
dim DB_PATH,DB_USER,DB_PWD
DB_PATH="/data/table.mdb"
DB_USER="*******"
DB_PWD="******"
dim connexion,nbconnexions
	sub dbcxstart()
		if IsObject(connexion) then	
			if connexion is nothing then nbconnexions=0
		end if
		if nbconnexions=0 then 
			dim DSN_BASE_
			DSN_BASE_= "DBQ=" & Server.Mappath(DB_PATH) & ";Driver={Microsoft Access Driver (*.mdb)};Uid=" & DB_USER & ";Pwd=" & DB_PWD & ";"
			on error resume next
			set connexion = Server.CreateObject("ADODB.connection")
			connexion.Open DSN_BASE_
			if Err.Number<>0 then Response.write("Erreur n° " & Err.Number & " lors de la connection à la base de données.") else nbconnexions=nbconnexions+1
			on error goto 0
		else
			nbconnexions=nbconnexions+1
		end if
	end sub