Dim ps As rdoPreparedStatement
Dim rs As rdoResultset
Dim strConnect As String
Dim strSQL As String
'利用 DSNless 连接到 pubs 数据库
'改变参数以适合你自己的 SQL Server
strConnect = "Driver={SQL Server}; Server=myserver; " & "Database=pubs; Uid=sa; Pwd="
Set cn = rdoEnvironments(0).OpenConnection(dsName:="", Prompt:=rdDriverNoPrompt, ReadOnly:=False, Connect:=strConnect)
strSQL = "Select so.name,sc.name,st.name,sc.length " & "FROM syscolumns sc,master..systypes st,sysobjects so " & "WHERE sc.id in (select id from sysobjects where type ='P')" & " AND so.type ='P' " & "AND sc.id = so.id " & "AND sc.type = st.type " & "AND sc.type <> 39"
Set ps = cn.CreatePreparedStatement("MyPs", strSQL)
Set rs = ps.OpenResultset(rdOpenStatic)
list1.AddItem "SP Name,Param Name,Data Type,Length"
While Not rs.EOF
list1.AddItem rs(0) & " , " & rs(1) & " , " & rs(2) & " , " & rs(3)
rs.MoveNext
Wend
rs.Close
Set rs = Nothing
cn.Close
Set cn = Nothing
【列出SQLServer数据库中所有的存储过程】相关文章:
2025年外省高中学业水平合格性考试成绩转入江苏认定的通告公布05-10
Vb中控件的自动排列05-10
写未来的作文300字05-10
Our Mother Is the Same 我们的妈妈是一样的05-10
中国大地保险公司实习报告05-10
小学父爱的作文600字05-10
07年4月北师大“中国古代文学史(一)”串讲(5)05-10
汪涵讲述小时候成长经历:鸡毛掸子的故事05-10
2023年广东梅州中考成绩查询时间及查分入口[7月7日起]05-10
关于清明节的英语作文:清明节05-10
儿童舞蹈教程:国标新手上路05-10
