IF EXISTS( Select  Name 
           From    sysobjects
           Where   Name =N'QueryPriceInList'
           And     Type = 'P')
   DROP PROCEDURE QueryPriceInList
GO
CREATE PROCEDURE QueryPriceInList @SelectPrice Decimal(18,6), @MaxPrice Decimal(18,6)
AS
Declare @PriceRangePercent decimal(18,6)
Select @PriceRangePercent = (@SelectPrice - @MaxPrice)/@MaxPrice--Create Table a(Price Decimal(18,6))
Insert Into a Values (@PriceRangePercent)
Select Price From a
--Drop Table #a
[/SQL]
在SQL查询分析器里能得到结果
我要在VB得到其结果
[code=VB]
With cn
     .ConnectionString = conn
     .Open
     .CursorLocation = adUseClient
strsqld = "exec QueryPriceInList '" & DleMoney & "','" & 38 & "'"
     Set rs = .Execute(strsqld)
End With
'然后
With rs
     If .State = 1 Then
        ..........
End With调试代码时,老是rs.State = 0,请问怎么回事?
添加监视rs时,也有许多"对象已关闭,操作不允许",是不是跟我写的存储过程有关系?