try
CREATE PROCEDURE Test @CustomerID char(5)
ASCREATE TABLE #tb
(
col char(5)
)set nocount on
INSERT INTO #tb (col) VALUES (@CustomerID)
set nocount off
SELECT col FROM #tb
DROP TABLE #tb
CREATE PROCEDURE Test @CustomerID char(5)
ASCREATE TABLE #tb
(
col char(5)
)set nocount on
INSERT INTO #tb (col) VALUES (@CustomerID)
set nocount off
SELECT col FROM #tb
DROP TABLE #tb
xx = "aaaaa"
str = "exec test '" & xx & "'
rs.Open str, cnnmydb, adOpenStatic, adLockReadOnly
If Not (rs.EOF And rs.BOF) Then
………………
end if'你好,这样是试一下,还不行的话,可以先不要删掉临时表看看结果。最主要的是
你的存储过程在sql查询分析器中是否通过。(你的应该没问题)