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
| <% @Language=VBSCRIPT %>
<% Option Explicit %>
<!--#include file = "ConnexionBaseDeDonnees.asp"-->
<!--#include file = "ConnexionBaseDeDonneesGenerique.asp"-->
<HTML>
<%
If Request("recherche") <> "" Then
'---Définition des constantes---'
Const adCmdTable = 2
Const adLockOptimistic = 3
'---Définition des variables---'
Dim objRS
Dim objRS2
Dim strSql
Dim strSql2
Dim strTable
Set objRS = Server.CreateObject("ADODB.Recordset")
Set objRS2 = Server.CreateObject("ADODB.Recordset")
strSql = "select tNomTable from tblCreationTable where fIdTable = " & Cint(Request("idtable"))
objRS.Open strSql, objConn, adLockOptimistic, adCmdTable
strTable = objRS(0)
strSql2 = "select * from " & strTable & " where " & Request("nomchamp") & " = " & Request("recherche")
Response.Write strSql2
'objRS2.Open strSql2, objConn2, , adLockOptimistic, adCmdTable'
objRS.Close
Set objRS = Nothing
'objRS2.Close'
'Set objRS2 = Nothing'
objConn.Close
Set objConn = Nothing
'objConn2.Close'
'Set objConn2 = Nothing'
End If
%>
</HTML> |