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
| <%@ Language=VBScript %>
<%OPTION EXPLICIT
CONST adParamInput = 1
CONST adParamReturnValue = 4
CONST adCmdStoredProc = 4
CONST adInteger = 3
CONST adVarChar = 200
DIM strConn, cnVisite, cmVisite, nomEtude
Session("nom_etude") = Request.Form("nomEtude")
nomEtude=Session("nom_etude")
SET cnVisite= Server.CreateObject("AdoDB.Connection")
strConn = "Provider=SqlOleDB; Server=***;Database=***;User ID=***;Password=***"
cnVisite.Open strConn
DIM cmSelectVisite, p_nomEtude
SET cmSelectVisite = Server.CreateObject("AdoDB.Command")
cmSelectVisite.CommandType=adCmdStoredProc
cmSelectVisite.CommandText="selectVisite"
cmSelectVisite.ActiveConnection=cnVisite
SET p_nomEtude = cmSelectVisite.CreateParameter( "@nomEtude", adVarChar, adParamInput, 50, nomEtude)
cmSelectVisite.Parameters.Append p_nomEtude
DIM strSql, rsVisite2
SET rsVisite2=cmSelectVisite.execute
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0" ><BR>
</HEAD>
<BODY>
<BR>
<BR>Vous travaillez sur l'étude = <%= nomEtude%>
<BR>
<BR>
<H3 align=center>Liste des Visites</H3>
<BR>
<TABLE Width="80%" Align="center" bgcolor="#e0e0ff" rules="all" bgcolor="black">
<TR>
<TH>Numéro de visite</TH>
<TH>Libellé de la visite</TH>
</TR>
<% DO UNTIL rsVisite.EOF %>
<TR>
<TD Align="middle"><%= rsVisite("ID_Visite") %></TD>
<TD Align="middle"><%= rsVisite("Lib_Visite") %></TD>
</TR>
<% rsVisite.MoveNext
LOOP
%>
</TABLE>
<BR><BR>
<BR>
Ajouter une nouvelle visite :
<BR>
Nom de la visite <FORM name="newVisite" action="visite.asp">
<input type="text" name="nomVisite" value="<nom de la visite>">
<input type="submit" value="valider">
</FORM>
<P> </P>
</BODY>
</HTML> |