CREATE PROCEDURE testproc
(@ta int,
@tb int output)
AS
select * from test where a=@ta
GO
表test为:
int a,int b
邮箱:zbdxyz_379@sohu.com
...全文
20712打赏收藏
求VC中mfc,用ADO调用带返回参数的存储过程,的源代码程序
如题,哪位仁兄有,请发一份,如可用,150分程上,,,,, 请附上使用说明,用得是mfc 假设存储过程为: CREATE PROCEDURE testproc (@ta int, @tb int output) AS select * from test where a=@ta GO 表test为: int a,int b 邮箱:zbdxyz_379@sohu.com
if (FAILED(pConn->Open("Driver=SQL Server;Server=server;Database=yhsysdb;UID=sa;PWD=","","",-1)))
{
AfxMessageBox("Can not open Database!");
pConn.Release();
return;
}
// COleVariant vtOptional((long)DISP_E_PARAMNOTFOUND,VT_ERROR);
// pConn->Execute(_bstr_t("insert into test values(8, 88)"), &vtOptional,- 1); //执行语句