vb执行存储过程为什么没记录返回???
列入:Tb_AA
code username
1 aaa
2 bbb
3 ccc
创建存储过程
create proc pro_AA
as
begin
set nocount on
select * from Tb_AA
set nocount off
end
---- 执行这个存储过程应该是返回三条记录集
现在我用vb去调用
Dim con As New ADODB.Connection
Dim rs2 As New ADODB.Recordset
Dim mycom As New ADODB.Command
StrCon = "Provider=SQLOLEDB.1;Password=" & strPassWord & ";Persist Security Info=True;User ID=" & strUserName & ";Initial Catalog="数据库名";Data Source=."
con.CommandTimeout = 3000
con.ConnectionString = StrCon
con.Open
''''''''数据库连接没问题
Set mycom.ActiveConnection = con
mycom.CommandText = "pro_AA"
mycom.CommandType = adCmdStoredProc
Set rs2 = mycom.Execute("pro_AA")
执行到这里 rs2中应该有三条记录集。。。
可是我在程序中得到rs2的记录集为空???
????