vb呼叫儲存過程

2021-04-17 14:44:42 字數 483 閱讀 4248

public sub procexe(byval procname as string, byval pch as string)  

dim cn as adodb.connection 

dim cmd as adodb.command  cn.connectionstring = "" 

cn.open 

set cmd.activeconnection = cn 

cmd.commandtype = adcmdstoredproc 

cmd.commandtext = procname 

cmd.parameters(1) = pch 

aa = cmd.parameters(2) 

bb = cmd.parameters(3) 

cn.close 

set cmd = nothing 

set cn = nothing

end sub  

VB呼叫儲存過程

dim adocomm as new adodb.command dim prmretval as adodb.parameter dim prmid as adodb.parameter adocomm.activeconnection conn adocomm.commandtype adcmd...

vb中呼叫帶引數的儲存過程

dim data connection as new adodb.connection ado連線物件 dim data recordset as new adodb.recordset ado的記錄集 dim sqlcmdcheckelement as new adodb.command dim ...

VB中呼叫儲存過程的幾種方法

vb中呼叫儲存過程的幾種方法 第一種方法 dim conn as string dim cn as new adodb.connection dim cm as new adodb.command conn provider sqloledb.1 integrated security sspi p...