且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何从标签中获取表名?

更新时间: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 this

string strSelect = string.Format("select * from {0} where ...", Label21.Text.ToString());


you should use
select * from ''+lblt.text.tostring()+" where <other>


相关阅读

技术问答最新文章