Dim ADOCMDSTCHECKUP As ADODB.Command
Dim AgeStart As ADODB.Parameter
Dim adors As ADODB.Recordset
Set adors = New ADODB.Recordset
Set AgeStart = New ADODB.Parameter
Set ADOCMDSTCHECKUP = New ADODB.Command
With ADOCMDSTCHECKUP
.CommandTimeout = 9000
.ActiveConnection = HealthCareCnt
.CommandType = adCmdStoredProc
.Properties("PLSQLRSet").Value = True
.CommandText = "{call EXUECUTESQL(?)}"
'.CommandText = "EXUECUTESQL"
Set AgeStart = .CreateParameter("agestart", advarChar, adParamInput, 200)
AgeStart.Value = "SELECT * FROM CHILDBASE"
.Parameters.Append AgeStart
set adors = .Execute
End With
以上是用vb从EXUECUTESQL存储过程取记录集合,其中存储过程EXUECUTESQL的内容是
(STRSQL in varchar2,RS OUT sys_refcursor) as
begin
OPEN RS FOR STRSQL;
end;
其中我用的是9i,为什么到.Execute是就出错能,报告“未指定的错误”
Dim AgeStart As ADODB.Parameter
Dim adors As ADODB.Recordset
Set adors = New ADODB.Recordset
Set AgeStart = New ADODB.Parameter
Set ADOCMDSTCHECKUP = New ADODB.Command
With ADOCMDSTCHECKUP
.CommandTimeout = 9000
.ActiveConnection = HealthCareCnt
.CommandType = adCmdStoredProc
.Properties("PLSQLRSet").Value = True
.CommandText = "{call EXUECUTESQL(?)}"
'.CommandText = "EXUECUTESQL"
Set AgeStart = .CreateParameter("agestart", advarChar, adParamInput, 200)
AgeStart.Value = "SELECT * FROM CHILDBASE"
.Parameters.Append AgeStart
set adors = .Execute
End With
以上是用vb从EXUECUTESQL存储过程取记录集合,其中存储过程EXUECUTESQL的内容是
(STRSQL in varchar2,RS OUT sys_refcursor) as
begin
OPEN RS FOR STRSQL;
end;
其中我用的是9i,为什么到.Execute是就出错能,报告“未指定的错误”
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货