% dim strConn 'Indiquez le chemin d'accés à votre base strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("dbbase/157hot08nept4.mdb") %> <% ' Affichage des catégories dans d'autres pages. function CategoryNameF(subjectID) dim adoCnF,adoRsF,strSQLF,thisCategory set adoCnF = Server.CreateObject("ADODB.Connection") adoCnF.open strConn strSQLF = "select CatName from Category where id="&subjectID set adoRsF = adoCnF.execute(strSQLF) thisCategory = adoRsF("CatName") adoRsF.close set adoRsF = nothing adoCnF.close set adoCnF = nothing CategoryNameF = thisCategory end function %> <% function EmailAddressF1(VarLoginName) dim adoCnF1,adoRsF1,strSQLF1,thisEmail,email set adoCnF1 = Server.CreateObject("ADODB.Connection") adoCnF1.open strConn strSQLF1 = "SELECT * FROM Login WHERE LoginName = '" & VarLoginName & "' ORDER BY LoginID;" set adoRsF1 = adoCnF1.execute(strSQLF1) thisEmail = adoRsF1("Email") adoRsF1.close set adoRsF1 = nothing adoCnF1.close set adoCnF1 = nothing EmailAddressF1 = thisEmail end function %> <% function GenRandomF(maxLength) Dim strRandom Dim strNext, strLast, strFirst, intCounter Randomize For intCounter = 1 To maxLength strNext = Int((1 - 0 + 1) * Rnd + 0) If strNext = 0 Then strLast = 90 strFirst = 65 Else strLast = 57 strFirst = 48 End If strRandom = strRandom & Chr(Int((strLast - strFirst + 1) * Rnd + strFirst)) Next GenRandomF = strRandom end function %>