LRe: Expert: Sorting a DBGrid from an Access Db via ADO

From: Pontus Berg (pontus_at_berg.to)
Date: 08/19/04

  • Next message: Dave Blake: "Re: Expert: Sorting a DBGrid from an Access Db via ADO"
    Date: Thu, 19 Aug 2004 08:44:02 +0200
    
    

    Howdy Brian,

    > >Is there any EASY way around this to actually sort a DBGrid based on a
    field
    > >which is of the Lookup kind?

    "Brian Bushay TeamB" <BBushay@Nmpls.com> wrote:

    > No.
    > Calculate the field in your SQL statement would be your best bet

    So basically, it's not possible. How do I do that in the SQL statement? The
    Lookup does 100% what I want, so it's just so convenient and it's a shame
    something like this woule force me into some complex solution instead.

    I have a table with a value in it and then I these values are looked up
    against another table and fills in a field in the first database. (The
    values are "country code" and it's looked against the long name of the
    country in a country table).

    The first table is ADO and Access 2003 (this is the one worked on) whereas I
    have the countries code and corresponding long names in a ClientDataSet.

    How do I do that in SQL? Does SQL feature lookup string replacement? (I'm a
    totaly know nothing beyond the SELECT * statement)

    /Pontus


  • Next message: Dave Blake: "Re: Expert: Sorting a DBGrid from an Access Db via ADO"

    Relevant Pages

    • Re: Returning readable lookup value not integer value from table
      ... Assuming you've added the ClaimSpecialistNames table to your query, ... Is there a line length limitation that I'm encountering? ... In creating a query that includes the lookup table value not key, ... BTW, in generating the SQL statement via concatenating field names, ...
      (microsoft.public.access.formscoding)
    • SQL statement to populate unbound textbox
      ... I have a table that I am using as a lookup to populate a table with info ... the text boxes are set as unbound boxes. ... My pitiful SQL statement applied as the Control Source to each unbound text ...
      (microsoft.public.access.forms)
    • Re: Searching in a combo box
      ... I also turned the lookup field in the table back to a normal long integer field, but this did not seem to have any effect. ... with the PersonID, based on your SQL statement, you'd use ... If you have a Lookup datatype in your membership table, ... data type to the PersonID (i.e., if PersonID is an Autonumber, make ...
      (microsoft.public.access.forms)
    • Re: Using Lookup in data pump
      ... > I am importing text files into SQl using the Transform Data Task. ... > validate some information by checking if a value in the text file (i.e. ... > reference the value from the text file in the SQL statement and how do I ... > know it the lookup is successful or not? ...
      (microsoft.public.sqlserver.dts)
    • Re: IBAN Number
      ... You need a list of valid ICAO two letter country codes (that use the IBAN ... Once you've got that set up, do a lookup using the first two characters of the ... If either the length is invalid or the country code is ... Const DigitMax As Long = 50 ...
      (microsoft.public.excel.programming)