28,406
社区成员
发帖
与我相关
我的任务
分享
CREATE PROCEDURE f_yb0
@my_b1 varchar(20),
@jd1 int
AS
set nocount on
declare @str varchar(500)
set @str = ' select id from ' + @my_b1 + ' where cpdw_id=0 and jd='+ CAST(@jd1 AS VARCHAR)
execute(@str)
GO
Set oConn = CreateObject("ADODB.Connection")
oConn.Open sConn
jd1=5
my_b1="users"
Set oCmd = CreateObject("ADODB.Command")
With oCmd
.CommandText = "f_yb0"
.CommandType = 4
Set oPara = .CreateParameter("@dF", 200, 1, 20, my_b1)
.Parameters.Append oPara
Set oPara = .CreateParameter("@dF", 3, 1, 4, jd1)
.Parameters.Append oPara
Set .ActiveConnection = oConn
Set rs = .Execute()
Set .ActiveConnection = Nothing
End With
Do While Not rs.EOF
WScript.Echo rs(0)
rs.MoveNext
Loop
With oConn
If .State <>0 Then .Close
End With
Set oCmd = Nothing
Set oConn = Nothing
CREATE PROCEDURE f_yb0
@my_b1 varchar(20),
@jd1 int
AS
set nocount on
declare @str varchar(500)
set @str = ' select id from ' + @my_b1 + ' where cpdw_id=0 and jd='+ CAST(@jd1 AS VARCHAR)
execute(@str)
GO