Results 1 to 3 of 3

Thread: Sorting user defined recordsets

  1. #1
    Jason Guest

    Sorting user defined recordsets


    Has there been any advances in the area of sorting when results are based on user defined recordsets? I've searched the forum and found a couple of messages based on this subject, but they were of little help. Here is my code...

    <%
    Set X= Server.CreateObject(&#34;ASP.DB&#34
    X.dbUnit = &#34;999&#34;
    X.dbMode = &#34;Both&#34;
    X.dbDBType = &#34;SQL65&#34;
    X.dbDAT = &#34;server,database&#34;
    X.dbGridColSort = True

    X.dbSQL = &#34;SELECT Name,Id,cat,subcat,price,city,state FROM Table WHERE State LIKE &#39;&#34; & ReqState & &#34;&#39;&#34;

    X.ASPdb
    %>

    After the results are displayed, if I click on a column to sort, I get the following error:

    Error: No record found
    SELECT COUNT(*) as c FROM SaleProperty WHERE State LIKE &#39;&#39;

  2. #2
    Frank Kwong Guest

    Sorting user defined recordsets (reply)

    don&#39;t know how you pass the variable to construct the SQL. You have to make that persistent and save it in the session var like ->

    req= request.querystring(&#34;reqstate&#34
    if req<>&#34;&#34; then session(&#34;reqState&#34=req

    X.dbSQL = &#34;SELECT Name,Id,... FROM Table WHERE State LIKE &#39;&#34; & session(&#34;ReqState&#34 & &#34;&#39;&#34;

    print out the SQL and make sure it is valid.

    Try also - X.dbOptions=&#34;KeepUserQueryString = true&#34; to make it sticky ! (see doc)

    FK

    ------------
    Jason at 4/23/01 8:26:05 PM


    Has there been any advances in the area of sorting when results are based on user defined recordsets? I&#39;ve searched the forum and found a couple of messages based on this subject, but they were of little help. Here is my code...

    <%
    Set X= Server.CreateObject(&#34;ASP.DB&#34
    X.dbUnit = &#34;999&#34;
    X.dbMode = &#34;Both&#34;
    X.dbDBType = &#34;SQL65&#34;
    X.dbDAT = &#34;server,database&#34;
    X.dbGridColSort = True

    X.dbSQL = &#34;SELECT Name,Id,cat,subcat,price,city,state FROM Table WHERE State LIKE &#39;&#34; & ReqState & &#34;&#39;&#34;

    X.ASPdb
    %>

    After the results are displayed, if I click on a column to sort, I get the following error:

    Error: No record found
    SELECT COUNT(*) as c FROM SaleProperty WHERE State LIKE &#39;&#39;

  3. #3
    Jason Guest

    Sorting user defined recordsets (reply)

    neither of those suggestions worked...

    I tried the session variable thing, but it still behaved the same way.
    The X.dbOptions=&#34;KeepUserQueryString = true&#34; suggestion sounded good, but it gave me a type mismatch on the X.ASPdb line.

    Help!

    Thanks,
    Jason



    ------------
    Frank Kwong at 4/23/01 11:31:33 PM

    don&#39;t know how you pass the variable to construct the SQL. You have to make that persistent and save it in the session var like ->

    req= request.querystring(&#34;reqstate&#34
    if req<>&#34;&#34; then session(&#34;reqState&#34=req

    X.dbSQL = &#34;SELECT Name,Id,... FROM Table WHERE State LIKE &#39;&#34; & session(&#34;ReqState&#34 & &#34;&#39;&#34;

    print out the SQL and make sure it is valid.

    Try also - X.dbOptions=&#34;KeepUserQueryString = true&#34; to make it sticky ! (see doc)

    FK

    ------------
    Jason at 4/23/01 8:26:05 PM


    Has there been any advances in the area of sorting when results are based on user defined recordsets? I&#39;ve searched the forum and found a couple of messages based on this subject, but they were of little help. Here is my code...

    <%
    Set X= Server.CreateObject(&#34;ASP.DB&#34
    X.dbUnit = &#34;999&#34;
    X.dbMode = &#34;Both&#34;
    X.dbDBType = &#34;SQL65&#34;
    X.dbDAT = &#34;server,database&#34;
    X.dbGridColSort = True

    X.dbSQL = &#34;SELECT Name,Id,cat,subcat,price,city,state FROM Table WHERE State LIKE &#39;&#34; & ReqState & &#34;&#39;&#34;

    X.ASPdb
    %>

    After the results are displayed, if I click on a column to sort, I get the following error:

    Error: No record found
    SELECT COUNT(*) as c FROM SaleProperty WHERE State LIKE &#39;&#39;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •