Sort access database

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • lannsjo@home.se

    #1

    Sort access database

    I have a database with swedish words but cant sort them in the correct
    order. When I hit sort Ascending the swedish letters Å Ä and Ö is
    not sorter correctly.
    How do I change this???

  • Benny Andersen

    #2
    Re: Sort access database

    On 14 Apr 2005 07:31:07 -0700, lannsjo@home.se wrote:
    [color=blue]
    >I have a database with swedish words but cant sort them in the correct
    >order. When I hit sort Ascending the swedish letters Å Ä and Ö is
    >not sorter correctly.
    >How do I change this???[/color]

    (in danish)
    menuline->funktioner->indstillinge r->generelt->sorteringsrækk efølge

    --
    Benny Andersen

    Comment

    • lannsjo@home.se

      #3
      Re: Sort access database

      that didnt help! it still sorts the table like this:

      Åby
      Angered
      Backa
      Örebro
      Oslo
      Ystad

      I want it like this:

      Angered
      Backa
      Oslo
      Ystad
      Åby
      Örebro

      To be mentioned is that I am getting the table with an ADO recordset:
      strSQL = "SELECT * FROM Adresstable ORDER BY Adress"

      When I connect to the database I do it like this:
      cDB.Open "Provider=Micro soft.Jet.OLEDB. 4.0;" & "Locale
      Identifier=1053 ;" & "Data Source=" & server.MapPath( "data.MDB")

      I read that I could put the Locale Identifier=1053 (swedish/finnish)
      but That didnt help either?????

      Someone??
      /M

      Comment

      • Lyle Fairfield

        #4
        Re: Sort access database

        lannsjo@home.se wrote:
        [color=blue]
        > When I connect to the database I do it like this:
        > cDB.Open "Provider=Micro soft.Jet.OLEDB. 4.0;" & "Locale
        > Identifier=1053 ;" & "Data Source=" & server.MapPath( "data.MDB")[/color]

        Did you try 1033?

        Comment

        • lannsjo@home.se

          #5
          Re: Sort access database

          Yes, but It didnt help??????????? ?

          Comment

          • Lyle Fairfield

            #6
            Re: Sort access database

            lannsjo@home.se wrote in news:1113575735 .155515.209280
            @g14g2000cwa.go oglegroups.com:
            [color=blue]
            > Yes, but It didnt help??????????? ?[/color]

            You could try this:

            1. Make a safety copy of your table!

            2. Check to be sure you have a safety copy of your table! Then be sure you
            have a reference to ADO.

            3. Check to be sure you have a safety copy of your table! Then run this
            code:

            CurrentProject. Connection.Exec ute "ALTER TABLE Yourtable ALTER Column
            YourColumn binary"

            (Remove line breaks before using.)

            4. Try the sort again.

            Did I mention: Make a safety copy of your table!

            ???

            If not then be sure

            TO

            Make a safety copy of your table!

            --
            Lyle
            --

            Comment

            • lannsjo@home.se

              #7
              Re: Sort access database

              ahhh.. no that cant help, what would it help to make my column
              binary...??

              I need to fix this problem, someone?

              Comment

              • Lyle Fairfield

                #8
                Re: Sort access database

                lannsjo@home.se wrote:[color=blue]
                > ahhh.. no that cant help, what would it help to make my column
                > binary...??[/color]

                It would accomplish a binary sort, which, it seems, is what you want.

                --
                --
                Lyle
                --

                Comment

                • Albert Marshall

                  #9
                  Re: Sort access database

                  Lyle wrote[color=blue]
                  >lannsjo@home.s e wrote:[color=green]
                  >> ahhh.. no that cant help, what would it help to make my column
                  >> binary...??[/color]
                  >
                  >It would accomplish a binary sort, which, it seems, is what you want.
                  >[/color]
                  Assuming that I understand what's going on (always a problem, that) then
                  how about creating a function that loops through a string and converts
                  all its characters to their ASCII equivalents. Then you could sort on a
                  query using that function in a calculated field.

                  Don't laugh, I actually had to do this once, but it's slow.

                  I'm going to go away and have a play with this. Wish me luck.
                  --
                  Albert Marshall
                  Marshall Le Botmel Ltd
                  01242 222017

                  Comment

                  • Lyle Fairfield

                    #10
                    Re: Sort access database

                    Albert Marshall wrote:[color=blue]
                    > Lyle wrote
                    >[color=green]
                    >> lannsjo@home.se wrote:
                    >>[color=darkred]
                    >>> ahhh.. no that cant help, what would it help to make my column
                    >>> binary...??[/color]
                    >>
                    >>
                    >> It would accomplish a binary sort, which, it seems, is what you want.
                    >>[/color]
                    > Assuming that I understand what's going on (always a problem, that) then
                    > how about creating a function that loops through a string and converts
                    > all its characters to their ASCII equivalents. Then you could sort on a
                    > query using that function in a calculated field.
                    >
                    > Don't laugh, I actually had to do this once, but it's slow.[/color]

                    C'mon Albert, admit it. It was your grandfather, right? And it just
                    finished yesterday....

                    --
                    --
                    Lyle

                    Comment

                    • Douglas J. Steele

                      #11
                      Re: Sort access database

                      Can't say for certain, as I haven't tested, but
                      http://msdn.microsoft.com/library/en...etprovspec.asp
                      seems to imply that the Connection should have a property named
                      DBPROP_INIT_LCI D that you should be able to set.

                      See whether

                      cDB.Open "Provider=Micro soft.Jet.OLEDB. 4.0;" & "Data Source=" &
                      server.MapPath( "data.MDB")
                      cDB.Properties( "DBPROP_INIT_LC ID") = 1054

                      works.

                      On the other hand, section 5.1 of http://www.winsoft.sk/adofaq.htm suggests:

                      cDB.Open "Provider=Micro soft.Jet.OLEDB. 4.0;" & "Locale
                      Identifier=0x04 1d;" & "Data Source=" & server.MapPath( "data.MDB")



                      --
                      Doug Steele, Microsoft Access MVP

                      (no e-mails, please!)



                      <lannsjo@home.s e> wrote in message
                      news:1113548956 .467962.220560@ o13g2000cwo.goo glegroups.com.. .
                      that didnt help! it still sorts the table like this:

                      Åby
                      Angered
                      Backa
                      Örebro
                      Oslo
                      Ystad

                      I want it like this:

                      Angered
                      Backa
                      Oslo
                      Ystad
                      Åby
                      Örebro

                      To be mentioned is that I am getting the table with an ADO recordset:
                      strSQL = "SELECT * FROM Adresstable ORDER BY Adress"

                      When I connect to the database I do it like this:
                      cDB.Open "Provider=Micro soft.Jet.OLEDB. 4.0;" & "Locale
                      Identifier=1053 ;" & "Data Source=" & server.MapPath( "data.MDB")

                      I read that I could put the Locale Identifier=1053 (swedish/finnish)
                      but That didnt help either?????

                      Someone??
                      /M


                      Comment

                      • lannsjo@home.se

                        #12
                        Re: Sort access database

                        Thanks everyone for your help, but nothing helped...
                        I finally found the problem, the database must have been corrupt. I
                        transfered all database tables to a new database and everything worked
                        fine..

                        Things like this really makes you mad...

                        Another question:
                        Where are the good reference guides for asp on the net.. I have been
                        searching for months now. PHP.net and mysql's reference guides are so
                        much better...

                        Comment

                        Working...