我有以下视图运行到外部 mssql 数据库。我正在使用输入参数连接到相同的数据库以获得一些完整的存储过程,这些工作正常,但视图不起作用并给出错误
Warning: mssql_execute() [function.mssql-execute]: message: The request for procedure 'usv_Extended_Confirmation' failed because 'usv_Extended_Confirmation' is a view object. (severity 18) in
Warning: mssql_execute() [function.mssql-execute]: General SQL Server error: Check messages from the SQL Server (severity 18) in
Warning: mssql_execute() [function.mssql-execute]: stored procedure execution failed in
Warning: mssql_fetch_assoc() expects parameter 1 to be resource, boolean given in
调用视图的脚本如下
//run msdb connected view procedure
function runView($procedure){
global $msdb;
//initiate function
$proc = mssql_init('usv_Extended_Confirmation', $msdb);
//Execute Procedure
$result = mssql_execute($proc);
while ($row = mssql_fetch_assoc($result)){
$results[] = $row;
}
$return = $results;
//Free Memory
mssql_free_statement($proc);
return $return;
}