reate the connection to the database in the Page_Load subroutine. ASP.NET includes two types of server controls that participate in the declarative data binding model: data source controls and data-bound controls. A new OleDbConnection class with a connection string which identifies the OLE DB provider and the location of the database.
Code:
<script runat="server">
sub Page_Load
dim dbconn
dbconn=New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;
data source=" & server.mappath("northwind.mdb"))
dbconn.Open()
end sub
</script>
Bookmarks