oh~ my god!!i'm not found the error.
error mssage:(two error)
1.comma,')',or a valid expression
2.name 'objcmd' is not declared
this is my bulding's code:
<%@ Page Language="
VB" %>
<%@ Import Namespace="system.data"%>
<%@ Import Namespace="system.data.oledb"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Sub stngo(ByVal sender As Object, ByVal e As EventArgs)
Dim objconn As New OleDbConnection()
objconn.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & Server.MapPath("db1.mdb")
objconn.Open()
Dim objcmd As New OleDbCommand("insert into info(name,age,form) values ('"&txtname.Text&"','"&txtage.text&"','"&txtform.t ext&"')",objconn)
objcmd.ExecuteNonQuery()
objconn.Close()
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>add</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" runat="server" Height="16px" Text="name£º" Width="57px"></asp:Label>
<asp:TextBox ID="TxtName" runat="server"></asp:TextBox><br />
<br />
<asp:Label ID="Label2" runat="server" Text="age£º"></asp:Label>
<asp:TextBox ID="TxtAge" runat="server"></asp:TextBox><br />
<br />
<asp:Label ID="Label3" runat="server" Height="13px" Text="form£º" Width="121px"></asp:Label>
<asp:TextBox ID="TxtForm" runat="server"></asp:TextBox><br />
<br />
<input id="Button1" type="button" value="button" onserverclick="stngo" />
</div>
</form>
</body>
</html>