<%@ 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 InsertCommand As SqlCommand = New SqlCommand()
InsertCommand.Connection = cnn
Dim sql As String
sql = "INSERT INTO TABELLA (campo) VALUES ('valore')"
InsertCommand.CommandText = sql
Try
cnn.Open()
InsertCommand.ExecuteNonQuery()
Catch ex As Exception
response.Write(ex.ToString())
Finally
cnn.Close()
End Try
end sub
</script>