ADODB.Recordset (0x800A0E78) error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AliHabib
    New Member
    • Dec 2008
    • 11

    ADODB.Recordset (0x800A0E78) error

    when trying to set the sql statement by this code give error
    ADODB.Recordset (0x800A0E78)
    Operation is not allowed when the object is closed.
    /SearchSubject.a sp, line 129

    Code:
    	if request("TxtFrom") ="" and request("TxtTo")<>"" then
    				if len(request("txtSearch2")) = 0 and len(request("Sens"))<> 0 then
    					sqlPRJ = "declare @x datetime; set @x = (select min(TCKT_OPN_DATE) FROM TCKTs);SELECT TCKT_ID,TCKT_SUB_DATE,TCKT_DESC FROM TCKTs WHERE TCKT_DESC like '%'+'"&request("txtSearch1")&"'+'%' COLLATE SQL_Latin1_General_CP1_CS_AS and TCKT_SUB_DATE between @x and '"&request("TxtTo")&"'"					
    				else
    				sqlPRJ = "declare @x datetime; set @x = (select min(TCKT_OPN_DATE) FROM TCKTs);SELECT TCKT_ID,TCKT_SUB_DATE,TCKT_DESC FROM TCKTs WHERE TCKT_DESC like '%'+'"&request("txtSearch1")&"'+'%' and TCKT_SUB_DATE between @x and '"&request("TxtTo")&"'"
    				end if
    				if len(request("txtSearch2")) <> 0 and len(request("Sens"))<> 0 then
    					if request("Filter")="And" then
    						sqlPRJ ="declare @x datetime; set @x = (select min(TCKT_OPN_DATE) FROM TCKTs);SELECT TCKT_ID,TCKT_SUB_DATE,TCKT_DESC FROM TCKTs WHERE  TCKT_DESC like '%'+'"&request("txtSearch1")&"'+'%' and TCKT_DESC like '%'+'"&request("txtSearch2")&"'+'%'COLLATE SQL_Latin1_General_CP1_CS_AS and TCKT_SUB_DATE between @x and '"&request("TxtTo")&"'" 
    					else
    						sqlPRJ = "declare @x datetime; set @x = (select min(TCKT_OPN_DATE) FROM TCKTs);SELECT TCKT_ID,TCKT_SUB_DATE,TCKT_DESC FROM TCKTs WHERE  TCKT_DESC like '%'+'"&request("txtSearch1")&"'+'%' or TCKT_DESC like '%'+'"&request("txtSearch2")&"'+'%'COLLATE SQL_Latin1_General_CP1_CS_AS and TCKT_SUB_DATE between @x and '"&request("TxtTo")&"'"
    					end if
    				end if  
    				if len(request("txtSearch2")) <> 0 and len(request("Sens"))= 0 then
    					if request("Filter")="And" then
    						sqlPRJ ="declare @x datetime; set @x = (select min(TCKT_OPN_DATE) FROM TCKTs);SELECT TCKT_ID,TCKT_SUB_DATE,TCKT_DESC FROM TCKTs WHERE TCKT_DESC like '%'+'"&request("txtSearch1")&"'+'%' and TCKT_DESC like '%'+'"&request("txtSearch2")&"'+'%' and TCKT_SUB_DATE between @x and '"&request("TxtTo")&"'"					
    					else
    						sqlPRJ ="declare @x datetime; set @x = (select min(TCKT_OPN_DATE) FROM TCKTs);SELECT TCKT_ID,TCKT_SUB_DATE,TCKT_DESC FROM TCKTs WHERE TCKT_DESC like '%'+'"&request("txtSearch1")&"'+'%' or TCKT_DESC like '%'+'"&request("txtSearch2")&"'+'%' and TCKT_SUB_DATE between @x and '"&request("TxtTo")&"'"
    					end if
    				end if
    			end if
  • Nicodemas
    Recognized Expert New Member
    • Nov 2007
    • 164

    #2
    No, I think you have given us the wrong portion of code. Nothing in the above statements would produce that error. Send all of the code for the file in question.

    Comment

    Working...