I have an ASP page that creates a recordset (based on some user's entry into a form on a previous page) and then writes a HTML table based on that recordset. I need to allow the user to sort the table by clicking the table headings. I want this done on the client side. My plan is the use the sort method of the recordset object and then re-write the HTML table with the correctly sorted table.
However, I can't get the sort method to work I think it has something to do with the cursors or something. Here's the rough structure of my ASP page:
Const adOpenStatic = 3
.
.
.
Dim objConn, strConnection
set objConn = Server.CreateObject("ADODB.Connection"
strConnection = "DSN=Connect1"
objConn.Open strConnection
.
.
.
Dim strQ, sells(40), regs(40), display, displaycount
Set Recordset1 = Server.CreateObject("ADODB.Recordset"
Set Recordset1.ActiveConnection = objConn
Recordset1.CursorLocation = adUseClient
Recordset1.CursorType = adOpenDynamic
.
.
.
Recordset1.Open strQ, objConn, 3, 3
It doesn't like the following line: Recordset1.CursorLocation = adUseClient
It says: "Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another."
Any idea of what is the problem????