更新时间:2023-02-26 10:07:43
Try something like this in your code -string myQuery = "select * from" + tname + "where ..."
.
You can then use myQuery in your command.
Make sure to use command parameters to avoid sql injection.
Try thisstring strSelect = string.Format("select * from {0} where ...", Label21.Text.ToString());
you should use
select * from ''+lblt.text.tostring()+" where <other>