Sort ADO Table

Posted on 2006-05-03
Last Modified: 2012-05-05
How do you sort an ADO table when the field name has a gap in the name ie 'Field Name', not 'Field_Name'

I know ADOTable.Sort := 'Field_Name ASC' will sort Fleld_Name, but what about 'Field Name'?

I have tried ADOTable.Sort := '[Field Name] ASC' and a few other combinations.


Question by:Dennis_Treacy
    LVL 7

    Accepted Solution

    What is your database?  

    I tested this with SQL Server and your '[Field Name] ASC' worked fine.

    Author Comment

    I am using Microsoft Access

    Author Comment

    I will get back to you. I think you are right.

    Author Comment

    Yes, you are right. I had another error my end. Your comment made me go back and check some other code.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
    Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now