Sort data results

How to sort data query result each time one clicks sort
button ...sort by name,date,etc

Say for instance you would like to out put the emails,
fullname and city. Want to sort by each header.
<cfparam name="sort" default="fullname asc">
<cfquery name="whatever' datasource="yoursource">
select *
from tbl
order by #sort#
</cfquery>
<!---- using U for ascending and D for descending order
---->
<table>
<tr>
<td>
Full Name <a href="page.cfm?sort=fullname
asc">U</a> | <a href="page.cfm?sort=fullname
desc">D</a>
</td>
<td>
Email <a href="page.cfm?sort=email asc">U</a> |
<a href="page.cfm?sort=email desc">D</a>
</td>
<td>
City <a href="page.cfm?sort=city asc">U</a> |
<a href="page.cfm?sort=city desc">D</a>
</td>
</tr>
<cfquery query="whatever">
<tr>
<td>#fullname#
</td>
<td>#email#
</td>
<td>#city#
</td>
</tr>
</table>
So when the user clicks on Full Nam U it will send the sort
value to the query and so forth.
Hope this helps,
Sevor Klu

Similar Messages

  • Custom Search portlet : how to sort the result in sequence (Portal 10.1.4)

    With a Custom Search portlet how to Sort the Result By Sequence. i.e. by respecting arrangements of the items in the page of contents?
    Actually the Results Options "Order By" are : Create Date, Author, Creator, Date Updated, Display Name, Last Update by, Publish Date, Score.
    Is there an action to add the "Sequence" Order By result Option?
    Great thanks for your kind help.
    Best regards

    No, I agree that it is functionality that should be added to the product, but it
    is not a bug because it was not written to do this.
    It is a short coming of the product.
    Cheers,
    Ersan

  • SPGridView - sorting Dates doesn't work properly & how to display the title column as link?

    Hi,
    I've got a SPGridView that is being filled with data from several lists. Some of them are a date-field and a title-field. I already added sorting, paging and filtering options and at first look they seem to work fine. But now I noticed that sorting dates
    doesn't work as expected. If I select ascending sorting, the result is something like this:
    01.08.2014
    02.08.2014
    17.07.2014
    18.07.2014
    23.07.2014
    If I select descending sorting, the result is this:
    23.07.2014
    18.07.2014
    17.07.2014
    02.08.2014
    01.08.2014
    This isn't what I want obviously. 
    I just added the EventReceiver for the sorting like it is shown in several tutorials:
    (The date field is a BoundField.)
    grid.Sorting += new GridViewSortEventHandler(grid_Sorting);
    private void grid_Sorting(object sender, GridViewSortEventArgs e)
    if (ViewState["FilterExpression"] != null)
    gridDS.FilterExpression = (string)ViewState["FilterExpression"];
    And my second problem is how to add a link to the title column. In my grid I'm displaying tasks from different lists and I want to link the title to the related task. I stumbled accross HyperLinkFields and tried this:
    HyperLinkField hyperLinkField = new HyperLinkField();
    hyperLinkField.DataTextField = "Titel";
    hyperLinkField.DataNavigateUrlFields = new string[] { "Titel" };
    hyperLinkField.DataNavigateUrlFormatString = "{0}";
    hyperLinkField.HeaderText = "Titel";
    hyperLinkField.SortExpression = "Titel";
    grid.Columns.Add(hyperLinkField);
    The resulting link is something like ...sites/MySite/_catalogs/masterpage/A1-V1-2 where "A1-V1-2" is the name of the task and also shown in the title field.
    The actual link should look more like ...sites/MySite/Lists/mytasklistname/DispForm.aspx?ID=.... or something like that to display the task details. How could I achieve that?
    Thanks in advance

    http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/MS-SharePoint/Q_27718782.html
    Here is the exact code you need to use:
    http://social.msdn.microsoft.com/Forums/ar/sharepointcustomization/thread/c463a8c6-4806-4233-b6a4-8db8369c5fc2
    http://sharepoint.stackexchange.com/questions/53459/change-title-linked-to-item-with-edit-menu-to-different-column
    Open the AllItems.aspx page for the specific list.
    Search for the <ViewFields> tag
    List item LinkToItem="TRUE" to whichever column you want the link:
    <ViewFields><br/>
    <FieldRef Name="Attachments"/><br/>
    <FieldRef Name="LinkTitle"/><br/>
    <FieldRef Name="linkThisColumn" LinkToItem="TRUE"/><br/>
    <FieldRef Name="data_x0020_column"/><br/>
    <FieldRef Name="Another_x0020_column"/><br/>
    </ViewFields><br/>
    http://sharepoint.stackexchange.com/questions/58954/link-title-in-list-to-value-in-url-column
    Create calculated column.
    Insert following formula -
    ="<a href='"&UrlFieldName&"'>"&Title&"</a>"
    Set "data type returned from this formula is" to integer.
    As a result on list view you will see the title with link to your url.
    UPD: It seems that URL field is not valid for calculated column, as workaround you can copy url value in a receiver into the another text field, which is not shown on the view.
    If this helped you resolve your issue, please mark it Answered

  • Custom Search Portlet : How to Sort the Result By Sequence (Portal 10.1.4)

    Customer request: With a Custom Search portlet how to Sort the Result By Sequence. i.e. by respecting arrangements of the items in the page of contents?
    (Like it's possible in MyOracle)
    Actually the Results Options "Order By" are : Create Date, Author, Creator, Date Updated, Display Name, Last Update by, Publish Date, Score.
    Is there an action to add the "Sequence" Order By result Option?
    Great thanks for your kind help.
    Best regards

    No, I agree that it is functionality that should be added to the product, but it
    is not a bug because it was not written to do this.
    It is a short coming of the product.
    Cheers,
    Ersan

  • Performance - using JDBC call with 'order by' vs sorting data on app server

    Hello! I need some valid thoughts on the performance of using a JDBC call versus processing information on the application server.
    Here is the somewhat simplified scenario:
    I need to retrieve customer information (name, e-mail, telephone), display it in HTML format and then be able to redisplay it in a different order. For example, initially the list would be displayed sorted by last name, but then a user might choose to sort it by e-mail address. Initial call to DB uses 'order by' in the SQL stmt to get me the initial ordering by last name. Results are stored in 2D array. However, when a user selects a different sort I have two options:
    1) just make another call to the DB with a different order by clause. This means I need to create a DB connection, connect to DB, retrieve the results and read them from result set into a 2 dimensional array
    2) re-sort data in the 2D array populated during the initial call. This means I need to use java.util.Arrays.sort(my_2D_resultsArray, my_custom_comparator)
    Question is : which is more efficient? Number of entries retrieved can be anywhere from 0 to a few thousands (depending on other filters such as customer's country). My feeling is that option umber 2 is better, but I would like to get your opinion.
    Thank you!

    Good points! Thanks! I ran a test (see code below) and it takes less than a second to sort 2000 Strings and 2000 nulls. The only thing I ran the test at a UNIX prompt as oppose to from within app server (Weblogic). I expect the speed to be compatible though. Do you think that test was valid and tells us that sorting on the app server is probably faster than doing another SQL query?
    import java.io.*;
    import java.math.*;
    import java.util.*;
    import java.util.Arrays.*;
    public class Test {
      public static void main(String[] args) throws Exception {
        Test test = new Test();
        test.testSortingPerformance();
      public void testSortingPerformance() {
        Object[] objArray2 = new Object[]{};
        Vector v = new Vector();
        Date start, end;
        java.util.Random rd = new java.util.Random(2000);
        for (int i = 0; i < 2000; i++){
          v.add(new Object[]{new String("" + rd.nextInt())});
          v.add(new Object[]{null});
        objArray2 = v.toArray();
        Object[] innerObjArray2 = new Object[]{};
        MyComparator2 myComp = new MyComparator2();
        start = new Date();
        java.util.Arrays.sort(objArray2, myComp);
        end = new Date();
        for (int i = 0; i < objArray2.length; i++) {
          System.out.println();
          innerObjArray2 = (Object[])objArray2;
    for (int j = 0; j < innerObjArray2.length; j++) {
    System.out.print(innerObjArray2[j] + " ");
    System.out.println(v.size());
    System.out.println("Start " + start + " End " + end);
    import java.util.*;
    public class MyComparator2
    implements Comparator {
    //position in the inner array to use for comparison
    private int position = 0;
    //default empty constructor
    public MyComparator2() {
    //implement compare method
    public int compare(Object o1, Object o2) {
    Object[] strAr1 = (Object[]) o1;
    Object[] strAr2 = (Object[]) o2;
    if (strAr1[0] == null){
    if (strAr2[0] == null){
    return 0;
    else{
    return -1;
    else if (strAr2[0] == null){
    return 1;
    return ( (String) strAr1[0]).compareTo( (String) strAr2[0]);

  • Sorting the results returned by a Ref cursor

    Hi All,
    I have a scenario where i am asked to sort results returned by a ref cursor.
    I have to pass the column to be sorted as the Input parameter to a stored procedure. I tried using 'order by sorting_parameter' in the ref cursor's select query, but it is not sorting the results. It is not throwing any error even.
    Please help.
    Many Thanks...

    Hi
    i came across the below reply for a thread with the similar query as above.
    <<
    Justin Cave
    Posts: 10,696
    From: Michigan, USA
    Registered: 10/11/99
    Re: sort data in ref cursor
    Posted: Feb 3, 2005 10:30 AM in response to: [email protected] Reply
    No. You could sort the data in the SQL statement from which the REF CURSOR was created, but once you have a REF CURSOR, you cannot do anything but fetch from it.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC
    >>
    So, the results from a ref cursor cant be sorted?? There is no way out?
    Kindly advise.

  • Sorting Data in Tables

    Hi anyone help with trying to resolve an issue with sorting data in a table I have created in Pages 08 v 3.0.2.
    I have a table six columns across with rows down of data. I have so far entered 10 rows of data and wanted to sort the data based on column 1 then column 2 with the associated data in the other columns staying connected to column 2. Fairly straightforward stuff I thought so clicked the table header for column 1 then the ascending sort button in Inspector the results I got were not quite what I expected.
    Here are three lines of data taken from columns 1 & 2. The sequence below is how I entered it. The data as you will see relates to classical music. In column 1 is the single word 'Mozart' all the other data is in column 2 on one line:
    Mozart Symphony No 29 in A Major KV201
    Mozart Symphony No 4 in D Major KV19
    Mozart Symphony No 36 in C Major KV425 'Linz'
    When I clicked the header for column 1 then the button in Inspector to sort the data ascending this is the result I got:
    Mozart Symphony No 29 in A Major KV201
    Mozart Symphony No 36 in C Major KV425 'Linz'
    Mozart Symphony No 4 in D Major KV19
    The first two entries are in the right order but the third one should obviously be first. Anyone know how I could resolve the issue I have with sorting data in the table I have created?
    Thanks ....

    Just to expand on Beatrice's answer, Pages (as most other word processors) sorts alphabetically. 4 comes after 39 alphabetically because the 4 comes after the 3. It doesn't think, "oh, that's the number 4 which is smaller than the number 39." By placing the leading 0 we wind up comparing 04 to 39 and yes, the zero is in front of the 3 so it gets placed ahead of it.

  • Excel14.4.7 (Excel for Mac 2011); can't sort data

    Upgraded to Excel for Mac 2011 (v.14.4.7) and cannot sort data. Have read instructions but keep getting error message "missing column/row name"
    Tried doing it with box checked "My list has headers" and with the box unchecked....same non-result and error message.
    I'm doing something wrong, obviously but can't figure it out. I am totally mystified & frustrated!
    any ideas????
    Thank you
    Rose

    This may be a related issue and fix:
    https://discussions.apple.com/message/26086328#26086328

  • Sorting Date and Time

    Hi Everyone,
    I have requirement to sort date and time fiields in an internal table.
    The internal table looks something like this during runtime.
    Line  Objectclass      UDATE            UTIME   OBJECTID         CHANGENR   CHANGE_IND
    8     ISU_EEIN     20080305     144814     000000000111     0000035262       I
    9     ISU_EEIN     20080305     145735     000000000112     0000035281       I
    10     ISU_EEIN     20080305     151418     000000000113     0000035319       I
    11     ISU_EEIN     20080305     154931     000000000114     0000035378      I
    12     ISU_EEIN     20080305     155002     000000000115     0000035389      I
    13     ISU_EEIN     20080305     162803     000000000116     0000035400      I
    14     ISU_EEIN     20080306     095028     000000000113     0000035450       U
    15     ISU_EEIN     20080306     123835     000000000117     0000035613      I
    16     ISU_EEIN     20080306     133532     000000000118     0000035628      I
    Now if you observe Line 10 and Line 14.
    OBJECT ID has two entries. One with Change_Ind 'I' on 05.03.2008 and 'U' on 06.03.2008 ,
    so here I need to have only ie... Line 14 for objectid 113 after sorting and deleting.
    The current sort stmt which i am using is not solving the purpose,
    Can you guys help me as how to achieve the result?
    Awaiting your replies.
    Regards,
    Vinay

    Hi,
    Did not achieve the desired,
    Just for your information the internal table is as follows.
    objuectclas  udate      utime    objectid         changenr      change_ind
    ISU_EEIN 20080305 144814 000000000111 0000035262     I
    ISU_EEIN 20080305 145735 000000000112 0000035281     I
    ISU_EEIN 20080305 151418 000000000113 0000035319     I
    ISU_EEIN 20080305 154931 000000000114 0000035378     I
    ISU_EEIN 20080305 155002 000000000115 0000035389     I
    ISU_EEIN 20080305 162803 000000000116 0000035400     I
    ISU_EEIN 20080306 095028 000000000113 0000035450    U
    ISU_EEIN 20080306 123835 000000000117 0000035613     I
    ISU_EEIN 20080306 133532 000000000118 0000035628     I
    If i use the delete statements only 1 entry will remain.
    Because i have to have only the latest record if it was updated,
    since document 113 was updated on 06.03.2008. I should have only one record.
    My result should be as follows.
    ISU_EEIN 20080305 144814 000000000111 0000035262     I
    ISU_EEIN 20080305 145735 000000000112 0000035281     I
    ISU_EEIN 20080305 154931 000000000114 0000035378     I
    ISU_EEIN 20080305 155002 000000000115 0000035389     I
    ISU_EEIN 20080305 162803 000000000116 0000035400     I
    ISU_EEIN 20080306 095028 000000000113 0000035450    U
    ISU_EEIN 20080306 123835 000000000117 0000035613     I
    ISU_EEIN 20080306 133532 000000000118 0000035628     I

  • Sort by result rows

    hi all
    In my query I got several chars: Organization, Planning Level, Date
    And 3 key figures: Planned amount, Actual Amount, Plan/Actual (calculated KF)
    My query got results by Organization on Plan/Actual KF (totals are averages).
    Now I need to sort up all Organizations by Planning accuracy, in other words I need to sort query results by Plan/Actual KF totals based on Organization Level.
    I created Condition TOP 100 % on Plan/Actual KFG with setting "Individual Chars and Char combinations" and assigning Organziation. But it seems it doesn't work.
    How can I make this work?

    Thnx, Akshay, but I already done like you said and run into some strange behaviuor.
    Than I keep it far left without Date in rows it seems ALMOST working. "Almost" because it sorts all organizations well except the last one, which is bigger then first before last, like this:
    Org PLevel KFG
    111   15      100
    112   14         90  
    109   14         65
    115   12         30
    110   13         89
    Second, it doesn't work at all than I got Date in rows (doesn't matter Organization is far left or no)...
    Edited by: Gediminas Berzanskis on May 11, 2010 1:56 PM

  • How can I maintain sorted data when I cut and paste?

    I work almost exclusively with .csv files that I download from the local multi-list service (I'm a real estate agent). I can sort and chart data on the multi-list website but the interface for Apple users is pretty bad (Citrix client running through a gateway). I was looking forward to being able to download and manipulate data on my iBook as well as be able to present it to clients in a polished and professional manner. As far as I am concerned Numbers seems like a Beta at this point. I have sent in feedback and realize that I will never receive a reply from doing so. I really want to like this program but right now I just want to run my iBook over with my truck. Any help will be much appreciated.
    I have three Numbers windows open. One is labeled "Sold" (20 columns, 693 rows+1 header), one is labeled "WE" (20 columns, 679 rows+1 header) and one is an untitled template (20 columns, 1 header). When I sort the data in "Sold" and "WE" to the parameters I need I end up with 18 rows in "Sold" and 22 rows in "WE". My goal is to take the sorted data and paste it into the untitled template.
    I select the 18 rows in "Sold" and then select copy (this takes 25.65 seconds BTW!!!). I go to the untitled template and then paste (20.86 seconds). Numbers pastes the entire 693 rows from "Sold" into the untitled template.
    I have tried to choose rows. I have tried to choose columns. I have selected individual cells and I have also tried to "select all cells". Each time I get a different result on what gets pasted into the untitled template. I have also tried "paste", "paste and match style" and "paste values" each time getting anything but what I need (the 18 sorted rows).
    Does anyone know how to do this?

    Hi,
    you should probablu describe better your actual situation:
    Is the form handler servlet a part of your portal web application?
    Seems like yes, if you use getContextPath() :-)
    then the form handler servlet should be able access the same session object
    through
    request.getSession()
    If this is not the case, than you could get the session id at the time when
    you create the form (in your portlet jsp file) and pass it as request
    parameter to the form handler servlet.
    That form handler servlet can return it later ...
    By the way - the session id is contained in the session cookie, that the
    browser sends everytime to the server in the requests. So when it hits the
    ".../application..." url, the server should automatically recognize to which
    session it belongs...
    HTH
    Ales
    "Mukul Sood" <[email protected]> wrote in message
    news:3cc9fd74$[email protected]..
    >
    Hello All,
    I am submitting to a form from a portlet.
    This formhandler is outside of the portal framework.
    Once I am done with form data processing, I need to come back into theportal.
    For this, I am sending a redirect request :
    response.sendRedirect(
    request.getContextPath()
    + "/application?" +"origin=FillMeta.jsp"+"&event=bea.portal.framework.internal.portlet.event"
    +"&wfevent=fileuploaded" +"&pageid=home"
    +"&portletid=FillMeta"
    However, I am not able to pass the sessionid in sendRedirect.
    How could I pass the sessionid using sendRedirect?
    Would greatly appreciate your inputs or suggestions.
    Thanks.
    Mukul

  • Sort Search Results

    Hi i have created a site which does a search from our
    database to get client for clients details. I want the page to
    display what the client is looking for and allow them to sort the
    results in the way required. The can sort by surname, Property
    address, Casework , Broker, Transaction, date instructed, and date
    last updated.
    Any ideas.

    quote:
    Originally posted by:
    cybertek23
    Hi i have created a site which does a search from our
    database to get client for clients details. I want the page to
    display what the client is looking for and allow them to sort the
    results in the way required. The can sort by surname, Property
    address, Casework , Broker, Transaction, date instructed, and date
    last updated.
    Any ideas.
    google "javascript sort"

  • Sort spotlight results?

    There used to be a "date modfied" column I could use to sort search results.
    Now I can only sort by "name," "kind," and "last opened."
    Since I often open the wrong version, I can't use "last opened" as a parameter.
    Is there maybe a 3rd party plugin for the finder that would enable me to sort spotlight results?
    Or, even easier, is there a method I'm missing?
    Thanks.

    Pathfinder kind of takes over your whole computer. But Forklift, which costs less, gives you dual panes and is just an amazing finder tool which uses spotlight for searches but gives you date modified. 29$.
    Eventually Mac will update spotlight so that it's more useful.
    It seems to me that "they" seem to want to infantilize us to death.
    Apple, some of us would like a few more options. We won't get too confused. Honest.

  • Sort data

    How to sort data query result each time one clicks sort
    button ...sort by name,date,etc

    I did dont work...
    =====
    <CFQUERY NAME="Rec" DATASOURCE="#EazyVector#">
    SELECT ctrData.FACILITY AS Facil,ctrData.CONTRACTNO AS
    CONTRACTNO,ctrData.CONTRACTDATE AS
    CONTRACTDATE,ctrData.CONTRACTTITLE AS
    CONTRACTTITLE,ctrData.DRWPROVIDEBY AS DRWPROVIDEBY,ctrDocs.DRWNO AS
    DRWNO,ctrDocs.SHEETNO AS SHEETNO,ctrDocs.CONTRACTNO AS
    DocCtrNo,ctrDocs.DRWTYPE AS DRWTYPE,ctrDocs.DISCIPLINE AS
    DISCIPLINE,ctrDocs.DRWTITLE AS DRWTITLE,ctrDocs.CONFCADDFILENAME AS
    ImageName,ctrDocs.DRWDATE AS DRWDATE ,ctrDocs.DOCID AS
    DOCID,ctrLoc.READONLYMEDIAPATH AS READONLYMEDIAPATH,
    ctrLoc.CONTRACTNO AS LocCtrNo
    FROM CONTRACTS ctrData,CONTRACT_DOCS
    ctrDocs,IMGS_LOCATION_FOLDER ctrLoc
    WHERE lower(ctrData.CONTRACTNO)=lower(ctrDocs.CONTRACTNO(+))
    AND lower(ctrData.CONTRACTNO)=lower(ctrLoc.CONTRACTNO(+))
    <CFIF Form.ConTNo NEQ "">
    AND lower(ctrData.CONTRACTNO) like lower('%#Form.ConTNo#%')
    </CFIF>
    <CFIF Form.ConTitle NEQ "">
    AND lower(ctrData.CONTRACTTITLE) like
    lower('%#Form.ConTitle#%')
    </CFIF>
    <CFIF #Form.Discipline# NEQ "">
    AND lower(ctrDocs.DISCIPLINE) LIKE
    lower('%#Form.Discipline#%')
    </CFIF>
    <CFIF #Form.DrawingNo# NEQ "">
    AND lower(ctrDocs.DRWNO) LIKE lower('%#Form.DrawingNo#%')
    </CFIF>
    <CFIF #Form.Facil# NEQ "">
    AND lower(ctrData.FACILITY) LIKE lower('%#Form.Facil#%')
    </CFIF>
    <CFIF #Form.DrwTitle# NEQ "">
    AND lower(ctrDocs.DRWTITLE) LIKE lower('%#Form.DrwTitle#%')
    </CFIF>
    <!--- Month
    <CFIF #Form.selectMonth# NEQ "">
    AND EXTRACT(MONTH FROM ctrData.CONTRACTDATE ) IN
    (#ListQualify(Form.selectMonth, "'")#)
    </CFIF>
    <!--- Day --->
    <CFIF #Form.selectDay# NEQ "">
    AND EXTRACT(DAY FROM ctrData.CONTRACTDATE ) IN
    (#ListQualify(Form.selectDay, "'")#)
    </CFIF>
    <!--- Year --->
    <CFIF #Form.selectYear# NEQ "">
    AND EXTRACT(YEAR FROM ctrData.CONTRACTDATE ) IN
    (#ListQualify(Form.selectYear, "'")#)
    </CFIF>--->
    <!--- Between Two Years --->
    <CFIF (#Form.selectYearF# NEQ "") AND (#Form.selectYearT#
    NEQ "")>
    AND ( EXTRACT(YEAR FROM ctrData.CONTRACTDATE ) BETWEEN
    #Form.selectYearF# AND #Form.selectYearT# )
    </CFIF>
    <!--- ORDER by most recent date first --->
    ORDER BY #sortKey# DESC
    </CFQUERY>

  • Pb retrieving sorted data from Table in SQL.

    Hi,
    I get problem to retrieve data in the right order from table in database SQL.
    See code attached: code.png
    I want to sort data according to ID number And then to retrieve those data and fill out a ring control in the right order "descending" .
    But i got always ID 2 instead of 1. See attached  picture : control.png
    it seems that the select statement (see under) is not woking properly. But it is working well in a query in Access DataBase .  
    //Select statement
       hstmt = DBActivateSQL (hdbc, ("SELECT * FROM %s ORDER BY ID DESCENDING",szTableName));
       if (hstmt<= DB_SUCCESS) {ShowError(); goto Error;}
    Some idea ??
    Lionel.
    Attachments:
    code.PNG ‏39 KB
    control.png ‏32 KB

    Hello Lionel,
    According to the document Robert linked, the prototype of DBActivateSQL() is:
    int statementHandle = DBActivateSQL (int connectionHandle, char SQLStatement[]);
    For the 2nd parameter(SQLStatement), you're sending:
    ("SELECT * FROM %s ORDER BY ID DESCENDING",szTableName)
    Probably your intention is to substitute %s with szTableName, but that's not what it happens.
    By using comma operator, ("SELECT * FROM %s ORDER BY ID DESCENDING",szTableName) is evaluated to szTableName, so you call is equivalent to:
    hstmt = DBActivateSQL (hdbc, szTableName);
    In order to substitute %s with szTableName you need to first build the string you're passing as the 2nd parameter:
    char query[512];
    sprintf(query, "SELECT * FROM %s ORDER BY ID DESCENDING",szTableName);
    hstmt = DBActivateSQL (hdbc, query);

Maybe you are looking for

  • QTY in return order more than billed QTY

    hi i am trying to rasie an return order with ref to billing doc and copying the quantity. Though the qty is getting copied from ref doc,i am able to increase the qty more than billed. the system is through an waring msg ,but allowing me raise the ret

  • ITunes 10 wont install

    Hi, itunes 10 won't install. It keeps giving me the error that "can't delete ipod service". I cancelled out and tried installing from from Tools>download only . No luck. I had this problem in going from 8 to 9 and I had to delete everything according

  • Version incompatibility JNDI error with Portal 4.0 and Server 9.0

    We have a JSP portal application running on Portal 4.0/Server 6.1. The application invokes EJB's on a separate WebLogic 6.1 server. This works fine. We are looking to upgrade our back-end WebLogic 6.1 servers while maintaining our Portal 4.0 web appl

  • CS3 and CS4 on same comuter

    Hello all, I have CS3 production premium suite on my laptop.  I upgraded to CS4 production premium suite.  I have to keep CS3 on my computer befause I have certain plug ins for Premiere that won't work in Premiere CS4 (cineform prospect hd and Procod

  • How to update all spry menu tabs on all pages

    Hi, Really need some help. I'm working in DW CS3. I've got a working Spry menu. ( Eureka!). I quickly made a template to start building pages. I left the spry bar as an uneditable region. My question is I made a change to the Spry Menu on the homepag