[转载]发一段老外的代码
<script runat=server type="text/vbscript"> Sub save(ByVal sender As Object, ByVal e As System.EventArgs)
Dim data2 As DataSet = New DataSet
Dim row2 As DataRow
Dim Connect As OleDbConnection = New OleDbConnection
Dim CB2 As OleDbCommandBuilder
Dim Adapter2 As OleDbDataAdapter = New OleDbDataAdapter
Connect.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=database_name.mdb"
Adapter2.SelectCommand = New OleDbCommand("Select * From people ", Connect)
Adapter2.Fill(data2, "info")
row2 = data2.Tables("info").NewRow
row2.Item("text") = textbox1.Text
data2.Tables("info").Rows.Add(row2)
CB2 = New OleDbCommandBuilder(Adapter2)
Adapter2.Update(data2, "info")
end sub
</script>
<asp:textbox TextMode=SingleLine ID="textbox1" runat="server"/><br/>
<asp:Button ID=button Text=save runat=server OnClick="save" />