none
MS Access Interop: How to get the datasheet column order

    Question

  • When using MS Access 2008 I noticed that once I create a few columns in a table I can move the columns in the datasheet just by dragging them. In fact, doing this will not change the database... only the datasheet user interface. Once I modify the order and close Access and reopen it, the order will be the way I modified it on the datasheet. That being said, how can I get the datasheet column order in C#?
    • Moved by Harry Zhu Monday, September 28, 2009 1:55 AM (From:Visual C# General)
    Tuesday, September 22, 2009 2:42 AM

All replies

  • You want the column order as specified in the datasheet user interface? I doubt if this functionality is exposed. What do you want it for? Why not just change the column order in the table?

    Tuesday, September 22, 2009 3:45 AM
  • For practicality. If you had 30 columns with lets say a thousand rows, would you really want to copy the table to a temporary table, drop the columns of the table, add the columns from the temporary table to the table in a certain order? The other reason is that my client for the WPF project I have going on wants to be able to modify the order of the columns and because the application needs to be using a MS Access database I want the order of the columns in my application to be the same as the in MS Access.
    Tuesday, September 22, 2009 4:34 AM
  • Hi,

    For discussions relating to word developing, I recommend you create a new thread at :
     

    http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.access&cat=en_US_973e53c3-c10e-4523-9213-cdfd537838f1&lang=en&cr=US

    You will get better and quicker responses from the experts there.

    Best regards,
    Harry


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Thursday, September 24, 2009 5:40 AM