Strange behaviour of a query

zaboss

Perch
Hi,
I have an application in classic ASP and I want to make an alphabetic paging.
If I grab the recordset this way:
Code:
...
ElseIf Request.Querystring("sortby")="let" then
msql = "SELECT * FROM tblCandidati Left Join tblIndustrii on tblCandidati.strIndustry=tblIndustrii.indID WHERE tblCandidati.strNume LIKE '" & Request.Querystring("ltr") & "%' ORDER by strNume ASC, strPspamSpamme ASC"
End if
Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open msql, MyConn, 1, 3
it generates an error:ADODB.Recordset error '800a0bb9'

Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
If i run it directly
Code:
SET RS=MyConn.Execute("SELECT * FROM tblCandidati Left Join tblIndustrii on tblCandidati.strIndustry=tblIndustrii.indID WHERE tblCandidati.strNume LIKE '" & Request.Querystring("ltr") & "%' ORDER by strNume ASC, strPspamSpamme ASC")
it works. My problem is that I also want paging (it may return 100s of records).
Any hint most appreciated.
 
Back
Top