問題:

在使用T-SQL"@參數"功能時

發生

Parameter '@ID' must be defined. 此狀況

 

解決方法:


在連線字串後加上參數;Allow User Variables=True

Example of Connection String:

 

Database=testdb;Data Source=localhost;User Id=root;Password=hello;Allow User Variables=True

參考來源:


http://blog.tjitjing.com/index.php/2009/05/mysqldatamysqlclientmysqlexception-parameter-id-must-be-defined.html

文章標籤
全站熱搜
創作者介紹
創作者 nusection 的頭像
nusection

Nu Section

nusection 發表在 痞客邦 留言(0) 人氣(799)