HTML : ouverture d'une appllication MS-ACCES (en local)
Bonjour,
j'ai une page HTML (Qui accède à une base de données en l'asp....)
Et qui me donne une liste de fichiers ACCESS
J'aimerais, quant je clique sur le lien de ce fichier
que ce fichier s'ouvre avec MS-ACCES de mon PC(de manière toute simple:roll:)
Ce que j'ai à l'heure actuelle est un peu bizare !8O
Au clic de mon lien :
- il ouvre une nouvelle fenêtre internet Iexplorer(contenant le lien du fichier)
- il me propose bien le popup de l'ouverture/sauvegarde du fichier .mdb
je choisi "Ouvrir",par la suite :
-dans un popup windows : j'ai le message suivant
Citation:
L'éditeur n'a pas pu être vérifié,voulez-vous vraiment exécuter ce logiciel ?
je choisi "Exécuter"
- Il réouverture,le menu d'ACCESS "user/pwd" dans ACCES
je choisi OK
- Et là, seulement, il ouvre l'application ACCESS en local
Merci pour votre aide
voici mon code
Code:
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 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
|
<html>
<head>
<title></title>
<script language="javascript">
function lancer(chemin)
{
var ExcelApp = new ActiveXObject("Excel.Application");
ExcelApp.Application.Visible = true;
ExcelApp.Workbooks.Open(chemin);
}
function lancer2(fic)
{
w = new ActiveXObject("WScript.Shell");
w.run ('start "'+fic+'"');
}
function lancer3(fic)
{
var xlapp = Server.Createobject("Excel.Application")
xlapp.Application.Visible = true
xlapp.workbooks.Open(fic)
}
function exec (cmd) { new ActiveXObject ("WScript.Shell").run (cmd) }
</script>
</head>
<body topmargin="0" leftmargin="50" rightmargin="50" background="bck.jpg" >
<!--
<div >
<a href onclick="javascript:lancer3('c:\\Inetpub\\wwwroot\\applications\\a.xls')">LANCER</a>
</div>
-->
<div>
<center>
<table border="0"height="100">
<tr>
<td width="100" valign="middle" align="center" ><a style="CURSOR:pointer" onClick="javascript:document.location.href='select_access.asp';"><img src="ACCESS.PNG" width=70 height="70"></a><td>
<td width="100" valign="middle" align="center" ><a style="CURSOR:pointer" onClick="javascript:document.location.href='select_asp.asp';"><img src="IEXPLORER.PNG" width=70 height="70"></a><td>
<td width="100" valign="middle" align="center" ><a style="CURSOR:pointer" onClick="javascript:document.location.href='select_xls.asp';"><img src="EXCEL.PNG" width=70 height="70"></a><td>
<!-- <td width="30"</td><td width="100" valign="middle" align="center" ><a style="CURSOR:pointer" onClick="javascript:document.location.href='users.asp';"><img src="USER_COMPUTER.PNG" width=70 height="70"></a><td>-->
</tr>
</table>
</center>
</div>
<%
Dim conn
Dim rs
dim my_name,my_path,my_file,my_ico
my_name=""
my_path=""
my_file=""
my_ico=""
Set conn = Server.CreateObject("ADODB.Connection")
'conn.open "lst_prog","",""
conn.Open "PROVIDER=MSDASQL;dsn=lst_prog;uid=;pwd=;"
'
' pour les applications ACCESS
'
sql = "SELECT * FROM pgm where pgm_group in ('mdb','mdb_interne') order by pgm_order asc;"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn, 3, 3
If Not rs.eof Then
rs.MoveFirst
%>
<table border="0" cellspacing="0" >
<thead>
<tr>
<th width="110" border="0" ><img border="0" src="access.png" width="50" height="50"></th>
<th border="0" ></th>
<th width="160" align="LEFT" <strong><font face="Arial" color="#000000" size="2">Nom</font></strong></th>
<th width="32" align="LEFT" <strong><font face="Arial" color="#000000" size="2"></font></strong></th>
<th width="200" align="LEFT" <strong><font face="Arial" color="#000000" size="2">Fichier</font></strong></th>
<th width="32" align="LEFT" <strong><font face="Arial" color="#000000" size="2"></font></strong></th>
<th width="250" align="LEFT" <strong><font face="Arial" color="#000000" size="2">Emplacement</font></strong></th>
</tr>
</thead>
<%
On Error Resume Next
Do while Not rs.eof
my_name=rs("pgm_name")
my_path=rs("pgm_path")
my_file=rs("pgm_file_name")
my_ico =rs("ico_name")
rs.MoveNext
%>
<tr valign="TOP">
<td ></td>
<td align="LEFT" > <img border="0" src=<%=my_ico%> width="24" height="24" ></td>
<td valign="middle" bordercolor="#C0C0C0" align="LEFT"> <font face="Arial" size="2" color="#000000"><%=my_name%></td>
<td valign="middle" bordercolor="#C0C0C0" align="LEFT"> <img border="0" src="pgm2.ico" width="24" height="24" ></td>
<td valign="middle" bordercolor="#C0C0C0" align="LEFT"> <font face="Arial" size="1" color="#000000"><a href="<%=my_path%>\<%=my_file%>" target="_BLANK"><%=my_file%></td>
<td valign="middle" bordercolor="#C0C0C0" align="LEFT"> <img border="0" src="path2.ico" width="24" height="24" ></td>
<td valign="middle" bordercolor="#C0C0C0" align="LEFT"> <font face="Arial" size="1" color="#000000"><a href="<%=my_path%>" target="_BLANK"><%=my_path%></td>
</tr>
<%
Loop
%>
</table>
<%
End If
rs.close
Set rs=Nothing
%>
<%
'
' Fernmeture de la session
'
conn.close
Set conn=Nothing
%>
<br><br><br>
<a href=http://172.16.10.214:8080/PRJTOMCAT5/GenerateRapport.pdf><img src="FolderAdobe.png" width=40 height="40" border=0></a>
</body> |