日期:2014-05-18  浏览次数:20445 次

exceute问题!
为什么sql语句insert可以用Command-> Execute而alter   table   resultinfo   add   field1   varchar(50)不能用   Command-> Execute?

------解决方案--------------------
把你的代码和错误提示贴出来,理论上是行得通的。

参考一下这个:
http://dotnet.csdn.net/page/31742f01-a283-48c3-984e-f6df7b58925a
------解决方案--------------------
估计权限不够
------解决方案--------------------
可能权限不够
------解决方案--------------------
绝对可以的说
贴出来看看
------解决方案--------------------
LZ 将 strsql 字符串打印出来,然后直接在SqlServer里面执行看看,

记得要用和应用程序连接数据库相同的帐户执行,

还有tempstring里面也不知道具体是什么可以加上[]
比如:strsql= "alter table resultinfo add [ "+tempstring+ "] varchar(50) NULL ";