<script language="VB" runat="server"> Sub subbtn_OnClick(Sender As Object, E As EventArgs) Dim connobj As ADOConnection Dim dtsCmdobj As ADODataSetCommand Dim dtSobj As DataSet Dim str_sql As String dim conn_str As String str_sql = "select * from table_name" conn_str = "DBQ=" & Server.MapPath("database.mdb") &_ ";Driver={Microsoft Access Driver (*.mdb)};"
connobj = New ADOConnection(conn_str) dtsCmdobj = New ADODataSetCommand(str_sql, connobj) dtSobj = New DataSet() dtsCmdob.FillDataSet(dtsobj, "table_name") dtgrid.DataSource = dtsobj.Tables("table_name").DefaultView dtgrid.DataBind() End Sub </script>