Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Re: ASP-SQL Server problem: rs.sort not working


Message #1 by "M. May" <mmay@b...> on Tue, 28 May 2002 20:01:02
You may or may not find this helpful, but I received this exact error 
message when I was sorting an Access database using a field of 
type "Memo".  The error disappeared when I changed the type of the field 
to "text".
> I added a field to a SQL Server Database. An already-working page which
> accessed this database and sorted the data based on its fields used
> rs.sort. This code works with the previously existing fields but gives
> this error when sorted on the new field (SubCategory)-
> 
> Provider error '80040e60' 
> 
> Order cannot be opened. 
> 
> /PMSOLDIER/lwipt/Action2/default.asp, line 74 
> 
> I couldn't find any information on Microsoft's knowledgebase regarding
> this error.
> 
> These are the relevant lines of code-
> 
> SortOrder=Request.QueryString("ord")
> SortField=Request.QueryString("fld")
> 
> SQLString="SELECT tblActionItems.*, tblActionStatus.StatusColor,
> tblActionStatus.StatusColorCode FROM tblActionItems INNER JOIN
> tblActionStatus ON tblActionItems.Status = tblActionStatus.StatusID "
> 
> Set DataConn=newDAtaConn()
> 
> Set RS = DATACONN.execute (SQLString)
> RS.PageSize=tPageSize
> 
> rs.Sort = SortField & " " & SortOrder   'line 74
> 
> Line 74 is the last one - with rs.sort
> 
> These are the fields in table tblActionItems
> TASKID, Status, Title, DateUpdated, DateOpened, Suspense, Summary,
> Strategy, SubCategory, Comments, POCID, Active, POCName, POCEmail, POCOrg
> 
> the querystring is:    ?fld=subcategory&ord=ASC
>  why does rs.sort work for all other fields but not for the newly added
> one?
> Amitabh
> 

  Return to Index