<%@Import Namespace="System.Data"%>
<%@Import Namespace="System.Data.OleDb"%>
<html>
<head>
<Script Language=VB Runat=Server>Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) 
Dim mySQLConnection As OleDbConnection
Dim mySQLCommand As OleDbCommand
 
'进行数据库链接
mySQLConnection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source="&Server.MapPath("ddd.mdb"))
mySQLCommand = new OleDbCommand("Insert into sss (主题,内容) Values ("gogogo","gogogo") " , mySQLConnection)
'打开数据库链接并执行SQL语句
mySQLCommand.Connection.Open()
mySQLCommand.ExecuteNonQuery()
mySQLConnection.Close()End Sub
</Script>
</head>
<body>
<Form runat="server">
<asp:button id="button1" text="添加" OnClick="button1_Click" runat="server"></asp:button>
</Form>
</body>
</html>