Server ASP.Net

<%@ Page Language="VB" %>


   Using Server.CreateObject from an ASP.NET Page
   
      Sub CreateRS()
         Dim rs1, rs2
         Dim ConnString As String
         ConnString = "driver={SQL Server};server=(local)\NetSDK;"
         ConnString =  ConnString & "database=Pubs;Trusted_Connection=yes"
         rs1 = Server.CreateObject("ADODB.Recordset")
         rs2 = Server.CreateObjectFromClsid("00000535-0000-0010-8000-00AA006D2EA4")
         rs1.Open("SELECT * FROM Authors", ConnString, 1, 3)
         rs2.Open("SELECT * FROM Titles", ConnString, 1, 3)
         Response.Write("There are " & rs1.RecordCount & " records in the Authors table.
" )
         Response.Write("There are " & rs2.RecordCount & " records in the Titles table.
" )
      End Sub
   


<% CreateRS %>