如何用VB处理如下的存取过程?

ysb 2001-07-19 08:48:12
例如存取过程如下:
create proc usp_calc_educ
as
create table #t_educ(
unit char(10) not null,
edu char(10) not null,
r_number int null)
--处理过程省略
select * from #t_educ
在VB中应该如何调用呢?


...全文
74 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
ysb 2001-07-25
  • 打赏
  • 举报
回复
怎么没有人回答了呢?
ysb 2001-07-23
  • 打赏
  • 举报
回复
你们有没有试过呀?
打开Recordset的时候,提示Recordset已经关闭
szxzwang,#t_educ是Sqlserver的暂存表,你试了吗?
szxzwang 2001-07-19
  • 打赏
  • 举报
回复
Look:
Dim recTemp as Adodb.recordset
'定义一个连接对象cn,并与数据库建立连接
set rectmep=cn.execute("select * from #t_educ")
'这样就得到了该表的记录集

好了,给分!
benlovekelly 2001-07-19
  • 打赏
  • 举报
回复
Dim cmmusp As ADODB.Command
Set cmmusp = New ADODB.Command
With cmmusp
.ActiveConnection = cnnusp(声明的连接对象connection)
.CommandText = "usp_calc_educ
.CommandType = adCmdStoredProc
.Execute
End With
Set cmmusp = Nothing
ysb满意这个回答吗??
cqq_chen 2001-07-19
  • 打赏
  • 举报
回复
Execute

7,763

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧