变量名'@Param'已经被声明

Nil*_*Pun 2 c# asp.net

当用户点击搜索按钮两次以上时,我正在为给定代码提供以下错误消息.有人可以帮助我做错了.

变量名'@Param'已经被声明.变量名在查询批处理或存储过程中必须是唯一的.

protected void btnSearch_Click(object sender, EventArgs e)
{
    DS.SelectCommand = 
      "SELECT ReportName, ReportType, 
       FROM Table 
       WHERE ReportName LIKE @param 
       ORDER BY ReportType Desc";
   DS.SelectParameters.Add("Param", searchTxtBox.Text.Replace("'", "''"));
   DS.DataBind();
   ListView1.DataBind();               
}
Run Code Online (Sandbox Code Playgroud)

Bal*_*a R 5

尝试

DS.SelectCommand = 
    "SELECT ReportName, ReportType, 
     FROM Table 
     WHERE ReportName LIKE @param 
     ORDER BY ReportType Desc";
DS.SelectParameters.Clear();
DS.SelectParameters.Add("Param", searchTxtBox.Text.Replace("'", "''"));
Run Code Online (Sandbox Code Playgroud)