OleDB Parameters

后端 未结 2 1287
面向向阳花
面向向阳花 2021-01-25 13:30

I have this access db that I have a ddl for the state name and a ddl for the year. I have a gridview that I\'d like to pass the value of the state drop down list into where cla

2条回答
  •  梦毁少年i
    2021-01-25 14:05

    myCommand.Parameters.AddWithKey("location", this.ddlStates.SelectedValue);
    

    That assumes that the data type of the location column is textual. If it's numeric or something else then convert the SelectedValue to the appropriate data type first.

提交回复
热议问题