SqlCommand中的调用函数publicvoidCreateMySqlCommand(){SqlCommandmyCommand=newSqlCommand();myCommand.CommandText="SELECT*FROMCategoriesORDERBYCategoryID";我的命令.CommandTimeout=15;myCommand.CommandType=CommandType.Text;我可以在myCommand.CommandText中使用SqlServer函数吗?为什么?如果您的意思是SQLServer用户定义函数。好的;你可以正常使用它:myCommand.CommandText="SELECTfn_Yourfunctionname(@parameternames)";myCommand.CommandType=CommandType.Text;myCommand.Parameters.Add(newSqlParameter("@parameternames",...它之所以起作用,是因为这是在SQLServer中直接调用函数的方式。以上是C#学习教程:在SqlCommand中调用函数的所有方法分享的内容,如果对大家有用,需要了解更多C#学习教程,希望大家多多关注~本文收集自网络,不代表立场,如涉及侵权,请点右转联系管理员删除,如有转载请注明出处:
