<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SQLClient" %>
<html>
<body>
<script language="VB" runat="server">
Sub Page_Load(sender as object, e as eventargs)
Dim objSQLConn As New SqlConnection()
objSQLConn.ConnectionString = _
"user id=USERID; password=PASSWORD; initial catalog=DATABASE; _
data source=DATABASESERVER;"
'Apro la connessione
objSQLConn.Open()
'Data adapter
Dim objAdapter As new SQLDataAdapter("SELECT * FROM TABELLA", objSQLConn)
'Creo il dataset
Dim ds as DataSet = new DataSet()
'Lo riempio
objAdapter.Fill(ds, "TABELLA")
End Sub
</script>
</body>
</html>