Trying to convert a mod to ms sql, where the access version uses rs.recordset. I've read on google that ms sql always returns -1 and that count(*) should be used instead.
I'm using this for a ''next page'' button, and it should return the records where approved is 1.
Does count(*) return only the amount of rows, and do I have to create new sql statements to get the actual data from the tables, or is it possible to combine the two methods of returning amount and data?
SET RS = Server.CreateObject("ADODB.RecordSet") rs.CursorType = 1 rs.LockType = 3 strSQL = "SELECT LibrariesFiles.ProgramName, LibrariesFiles.ID, LibrariesFiles.UploadedBy, LibrariesCategories.Categoryname FROM LibrariesCategories, LibrariesFiles" strSQL = strSQL & " WHERE librariesFiles.CatID = LibrariesCategories.ID AND Approved=1" strSQL = strSQL & " ORDER BY LibrariesFiles.ID DESC;"
|
Thanks in advance.