有关一条SQL语句,急~~~~~~~~~~~~~

popofish2002 2004-07-09 07:13:03
CString str;
CStatement *pDBStmt;

try
{
str="{call wf_delModel(" + WF_GetFieldSQL(wid) + ")}"; //?
pDBStmt = g_pDBCon->CreateStatement();
pDBStmt->ExecuteUpdate(str);
}
今天看到这样一些语句,不明白什么意思str里面能这样写吗?
...全文
163 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
Softice2004 2004-07-12
  • 打赏
  • 举报
回复
Call用于调用存储过程
是这样的。
DebugXP 2004-07-11
  • 打赏
  • 举报
回复
Call用于调用存储过程
pyx1234 2004-07-11
  • 打赏
  • 举报
回复
call 是调用函数用的!好象是c中的命令!在SQL SERVER的查询分析器中调用存储过程用的是exec,没有用过call!
suisuibianbian 2004-07-10
  • 打赏
  • 举报
回复
记得有这种写法,call 是调用函数的意思,后面的wf_delModel是函数名,WF_GetFieldSQL(wid)就是函数参数
晨星 2004-07-10
  • 打赏
  • 举报
回复
你可以查一下SQL Server 2000的联机帮助,里边有详细的说明。
晨星 2004-07-10
  • 打赏
  • 举报
回复
call的就是存储过程啊。
popofish2002 2004-07-09
  • 打赏
  • 举报
回复
wf_delModel是存储过程 call是什么意思
popofish2002 2004-07-09
  • 打赏
  • 举报
回复
我的意思是:
str="{call wf_delModel(" + WF_GetFieldSQL(wid) + ")}"; //?

call什么意思,是调用什么dll还是lib还是其他
晨星 2004-07-09
  • 打赏
  • 举报
回复
这条语句应该是调用数据库的某个存储过程吧?
ANewGuy 2004-07-09
  • 打赏
  • 举报
回复
你说的问题说的不太清楚啊!
你的意思是str="{call wf_delModel(" + WF_GetFieldSQL(wid) + ")}"; //?
这句中+号为什么能用么?CString中重载了+运载符号!
Kudeet 2004-07-09
  • 打赏
  • 举报
回复
没有用过,查的MSDN

你可以从ExecuteUpdate来看那个语句是干什么的。
The executeUpdate method is a special case method that calls the underlying ADO execute method with certain parameters. The executeUpdate method does not support the return of a Recordset object, so the execute method's options parameter is modified with AdoEnums.ExecuteOptions.NORECORDS. After the execute method completes, its updated RecordsAffected parameter is passed back to the executeUpdate method, which is finally returned as an int.
当然还要看pDBStmt是什么类型的变量connetico command 是有区别的,

4,011

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 数据库
社区管理员
  • 数据库
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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