Fill the DataSet by using the OleDbDataAdapter and connection to Access Database (VB.net) : OleDbDataAdapter « ADO.net Database « ASP.NET Tutorial






<%@ Page Language="VB" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDB" %>

<script runat="server">
   sub Page_Load(Sender as Object, e as EventArgs) 
      dim myConnection as new OleDbConnection( _
            "PROVIDER=Microsoft.Jet.OLEDB.4.0;" _
            & "DATA SOURCE=" _
            & Server.MapPath("EmployeeDatabase.mdb;"))

      dim myCommand as OleDbDataAdapter = new OleDbDataAdapter _
         ("select * from employee", myConnection)

       dim ds as DataSet = new DataSet()
       myCommand.Fill(ds, "employee")
    end sub
</script>

<html><body>
   <form runat="server">
   
   </form>
</body></html>








18.14.OleDbDataAdapter
18.14.1.Fill the DataSet by using the OleDbDataAdapter and connection to Access Database (VB.net)
18.14.2.Use DataTable to read the result set from an OleDbDataAdapter and a DataSet (VB.net)
18.14.3.Filling Multiple DataTables