<%@ 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 objCon As New SQLConnection("server=DBSERVER;User id=USER;password=PWD;database=DB")
Dim objAdapter As SQLDataAdapter
Dim ds as new DataSet()
objAdapter = New SQLDataAdapter("Select campo1, campo2 from miaTabella", objCon)
objAdapter.Fill(ds, "miaTabella")
ds.writeXML(Server.MapPath("./miaTabella.xml"))
end sub
</script>