Torna al Thread
<%
dim cn
dim rs
Dim var As String
Set cn=Server.CreateObject("ADODB.Connection")
dim strsql as string
dim var1 as string
var= Request("variabile")
strcon ="Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=tabella;Data " & _
" Source=(local)"
cn.Open strcon
Set rs= Server.CreateObject("ADODB.Recordset")
strsql="select campo from tabella where cod='" & mid(pag,1,3) & "'"
rs.Open strsql, cn
var1=rs.fields("campo").value
rs.Close
set rs= Nothing
cn.Close
set cn= Nothing
%>