我正在发现这一错误。
You tried to assign the Null value to a variable that is not a Variant data type.
This is the code:
</asp:GridView>
<asp:AccessDataSource ID="AccessDataSource1" runat="server"
DataFile="~/videogames.accdb"
DeleteCommand="DELETE FROM [Table1] WHERE [ID] = ?"
InsertCommand="INSERT INTO [Table1] ( ID,Name, ScreenName, Age, Game, YearsPlaying) VALUES (?, ?, ?, ?, ?, ?)"
SelectCommand="SELECT * FROM [Table1]"
UpdateCommand="UPDATE [Table1] SET [Name] = ?, [ScreenName] = ?, [Age] = ?, [Game] = ?, [YearsPlaying] = ? WHERE [ID] = ?">
<DeleteParameters>
<asp:Parameter Name="ID" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="ID" Type="Int32" />
<asp:Parameter Name="Name" Type="String" />
<asp:Parameter Name="ScreenName" Type="String" />
<asp:Parameter Name="Age" Type="Int32" />
<asp:Parameter Name="Game" Type="String" />
<asp:Parameter Name="YearsPlaying" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="Name" Type="String" />
<asp:Parameter Name="ScreenName" Type="String" />
<asp:Parameter Name="Age" Type="Int32" />
<asp:Parameter Name="Game" Type="String" />
<asp:Parameter Name="YearsPlaying" Type="String" />
<asp:Parameter Name="ID" Type="Int32" />
</UpdateParameters>
我已经结束,我不能让它工作。 谁能帮助我? 感谢。
当我试图删除“Id”中的“参数”时,它有不同的错误。