<%@ Page Language="VB" Debug="true" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SQLClient" %>
<script language="VB" runat="server">
Sub Page_Load(Source as Object, E as EventArgs)
Dim cnn As New SQLConnection("server=DBSERVER;User id=USER;password=PASSWORD;database=DB")
Dim objCommand As New SqlCommand("Select campo from tabella", objConn)
objCommand.Connection.Open()
Dim aReader As SqlDataReader = objCommand.ExecuteReader(CommandBehavior.CloseConnection)
While aReader.Read()
Response.Write(aReader.GetString(1) & "<br/>")
End While
aReader.Close()
objConn.Close()
End sub
</script>