在 System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)
在 System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
在 System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)
在 System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
在 System.Data.OleDb.OleDbCommand.ExecuteNonQuery()
在 DreamweaverCtrls.DataSet.DoInit()
为什么会这样,下面是我的上部分代码
<%@ Page Language="VB" ContentType="text/html" %>
<%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls" Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,culture=neutral" %>
<MM:Insert
runat="server"
CommandText='<%# "INSERT INTO User (AdminName, AdminPws) VALUES (?, ?)" %>'
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_webdata") %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_webdata") %>'
Expression='<%# Request.Form("MM_insert") = "form1" %>'
CreateDataSet="false"
Debug="true"
>
<Parameters>
<Parameter Name="@AdminName" Value='<%# IIf((Request.Form("AdminName") <> Nothing), Request.Form("AdminName"), "") %>' Type="WChar" />
<Parameter Name="@AdminPws" Value='<%# IIf((Request.Form("AdminPws") <> Nothing), Request.Form("AdminPws"), "") %>' Type="WChar" />
</Parameters>
</MM:Insert>
<MM:DataSet
id="User"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_webdata") %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_webdata") %>'
CommandText='<%# "SELECT * FROM [User] WHERE AdminName = ?" %>'
Debug="true"
>
<Parameters>
<Parameter Name="@AdminName" Value='<%# IIf((Request.Form("AdminName") <> Nothing), Request.Form("AdminName"), "") %>' Type="WChar" />
<Parameter Name="@AdminPws" Value='<%# IIf((Request.Form("AdminPws") <> Nothing), Request.Form("AdminPws"), "0") %>' Type="WChar" />
</Parameters>
</MM:DataSet>
<MM:PageBind runat="server" PostBackBind="true" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Sub Page_Load(Src As Object, E As EventArgs)
Label1.visible="false"
if User.recordcount>0 then
session("User")=request.form("AdminName")
response.Redirect("index.aspx")
end if
End Sub
Sub sub_ling(Src As Object, E As EventArgs)
Label1.Visible="True"
End Sub
</script>