<%@ 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 cmd As SQLCommand = New SQLCommand("Select count(*) from tabella", cnn)
cnn.Open()
response.write (cmd.ExecuteScalar().toString )
end sub
</script>