www.fltk.net > vB调用sql存储过程

vB调用sql存储过程

'引用Microsoft ActiveX Data Objects 2.8 Library Dim Cnn As ADODB.Connection Dim Rs As ADODB.Recordset Dim Cnn_c As New ADODB.Command Dim cnn_p As ADODB.Parameter Set Cnn = New ADODB.Connection Set Rs = New ADODB.Recordset 'On E...

你可以使用 ADODB.Command 来调用存储过程,如: Dim adoComm As Object '// 创建一个对象,我们用来调用存储过程 Set adoComm = CreateObject("ADODB.Command") With adoComm '// 设置连接,假设 adoConn 为已经连接的 ADODB.Connection 对象 ....

'引用Microsoft ActiveX Data Objects 2.8 Library Dim Cnn As ADODB.Connection Dim Rs As ADODB.Recordset Dim Cnn_c As New ADODB.Command Dim cnn_p As ADODB.Parameter Set Cnn = New ADODB.Connection Set Rs = New ADODB.Recordset 'On E...

1 用ado,连接字符串参考下面代码. dim sA as string 'ip方式 sA = "Provider=SQLOLEDB; Data Source= dbServer ,1433; Network Library=DBMSSOCN; ;Initial Catalog= dbDataBaseName ;User ID= dbUserName ;Password= dbPassWord" ‘计算机名方式...

'引用Microsoft ActiveX Data Objects 2.8 LibraryDim Cnn As ADODB.ConnectionDim Rs As ADODB.RecordsetDim Cnn_c As New ADODB.CommandDim cnn_p As ADODB.Parameterdim CourseID as string,CustomerID as stringSet Cnn = New ADODB.Connect...

Set rs = cmd.Execute 没有错误,除非你的存储过程有参数,而你没有传递参数

调用存储过程查询数据 Dim MyComm As ADODB.Command Set MyComm = MyServer.CreateObject("ADODB.Command") With MyComm .ActiveConnection = MarketConn 'MarketConn是数据库连接字串 .CommandText = "spGetList" '指定存储过程名 .CommandType...

我给你两种简单的方法: 1. 过程 CREATE PROCEDURE cyPFindWaitExecSO ----按货品编码查出没有执行销售订单(不包括 CANCEL 作废, stoped 中止) @GOODSCODE VARCHAR(100) AS SELECT SO.WDATE,so.BILLCODE,a.QTY,a.EXEQTY,a.QTY-a.EXEQTY WaitExe...

cn.Execute "EXEC 存储过程名称"

网站地图

All rights reserved Powered by www.fltk.net

copyright ©right 2010-2021。
www.fltk.net内容来自网络,如有侵犯请联系客服。zhit325@qq.com