请教下这里的SQL语句躲在哪里?

dzswej 2008-07-30 04:52:12
这是在App_Code里的一个CS数据操作文件:
但我就是没有找到"Pr_UpdateCategoryOrder"在哪?
在相关页面cs文件里也没有?
请指点,解决马上结账!
public int UpdateCategoryOrder(int categoryID,string moveFlag)
{ ///获取连接字符串
string connectionString = ConfigurationManager.ConnectionStrings["SQLCONNECTIONSTRING"].ConnectionString;
///创建连接
SqlConnection con = new SqlConnection(connectionString);
///设置被执行存储过程的名称
string cmdText = "Pr_UpdateCategoryOrder";
///创建SqlCommand
SqlCommand cmd = new SqlCommand(cmdText,con);
///设置执行方式为存储过程
cmd.CommandType = CommandType.StoredProcedure;
///创建参数并赋值
cmd.Parameters.Add("@ID",SqlDbType.Int,4);
cmd.Parameters.Add("@MoveFlag",SqlDbType.VarChar,20);
cmd.Parameters[0].Value = categoryID;
cmd.Parameters[1].Value = moveFlag;

int result = -1;
try
{ ///打开连接
con.Open();
///操作数据
result = cmd.ExecuteNonQuery();
}
catch(Exception ex)
{ ///抛出异常
throw new Exception(ex.Message,ex);
}
finally
{ ///关闭连接
con.Close();
}

return result;
}
...全文
124 19 打赏 收藏 转发到动态 举报
写回复
用AI写文章
19 条回复
切换为时间正序
请发表友善的回复…
发表回复
mengxj85 2008-07-30
  • 打赏
  • 举报
回复
[Quote=引用 6 楼 tangserver 的回复:]
///设置被执行存储过程的名称
string cmdText = "Pr_UpdateCategoryOrder";
///创建SqlCommand
[/Quote]
frankie_24 2008-07-30
  • 打赏
  • 举报
回复
插入前20十
jack86514 2008-07-30
  • 打赏
  • 举报
回复
Pr_UpdateCategoryOrder is a stored porcedure name, will perform the stored procedure and excute in the SQL
weiguang1235 2008-07-30
  • 打赏
  • 举报
回复

use [数据库名]
go

sp_helptext Pr_UpdateCategoryOrder
go

Krismeng 2008-07-30
  • 打赏
  • 举报
回复
只能顶一下了 。
xray2005 2008-07-30
  • 打赏
  • 举报
回复
SqlCommand cmd = new SqlCommand(cmdText,con);
///设置执行方式为存储过程
cmd.CommandType = CommandType.StoredProcedure;
///创建参数并赋值
闲游四疯 2008-07-30
  • 打赏
  • 举报
回复
回帖是一种美德!
财富实验室 2008-07-30
  • 打赏
  • 举报
回复
有才!
yyixin 2008-07-30
  • 打赏
  • 举报
回复
数据库里的"可编程性→存储过程"选项
dzswej 2008-07-30
  • 打赏
  • 举报
回复
哦 那请问在哪查看到啊 我是SQL 2005的数据库
回.到.未来 2008-07-30
  • 打赏
  • 举报
回复
这个是存储过程名啊
SeerMi 2008-07-30
  • 打赏
  • 举报
回复
在sqlserver的数据库里面存储着
accomp 2008-07-30
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 fuda_1985 的回复:]
///设置执行方式为存储过程
cmd.CommandType = CommandType.StoredProcedure;
躲在数据库里!昏倒,你没看到是执行的存储过程么?
[/Quote]
tangserver 2008-07-30
  • 打赏
  • 举报
回复
///设置被执行存储过程的名称
string cmdText = "Pr_UpdateCategoryOrder";
///创建SqlCommand
wxg22526451 2008-07-30
  • 打赏
  • 举报
回复
存储过程"Pr_UpdateCategoryOrder"是在SQL数据库里的。。
xxgu 2008-07-30
  • 打赏
  • 举报
回复
在数据库里找Pr_UpdateCategoryOrder这个存储过程...
wholdbird 2008-07-30
  • 打赏
  • 举报
回复
Pr_UpdateCategoryOrder是存储过程的名称。在数据库的存储过程中应该能找到
fuda_1985 2008-07-30
  • 打赏
  • 举报
回复
你在连接的那个数据库里打sp_helptext Pr_UpdateCategoryOrder
就可以看到存储过程里写的啥了!
fuda_1985 2008-07-30
  • 打赏
  • 举报
回复
///设置执行方式为存储过程
cmd.CommandType = CommandType.StoredProcedure;
躲在数据库里!昏倒,你没看到是执行的存储过程么?

62,046

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧