请老师帮我看看,怎么就是写不了数据库呢?
<%@ Import Namespace="System.Data.SqlClient" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
</head>
<script language="VB" runat="server">
Sub SubmitBtn_Click(Sender As Object, E As EventArgs)
Dim MyConnection As SqlConnection
Dim MyCommand As SqlCommand
MyConnection = New SqlConnection("Server=(local);Database=ship;User ID=sa;Password=terry;Trusted_Connection=False")
MyCommand = New SqlCommand("INSERT INTO yudimaodi (hangci) VALUES (47)", MyConnection)
End Sub
</script>
<body>
<form runat=server >
<asp:button text="提交" Onclick="SubmitBtn_Click" runat=server/>
</form>
</body>
</html>