Re: Sort order in PocketAccess with PPC 2003_Phone edition
- From: "Richard Mueller" <rlmueller-NOSPAM@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 2 Mar 2006 10:55:27 -0600
Hi,
I don't know if this is your problem, but when you retrieve RecordCount from
a recordset, I believe the cursor is at the end of the recordset. I would
suggest you try:
Main.rs.Open "SELECT * FROM Tbl_1 ORDER BY Txt", Main.cn
Main.rs.MoveFirst
Do Until Main.rs.EOF
frmkat.Ansl.AddItem (Main.rs.Fields(1).value)
Main.rs.MoveNext
Loop
Main.rs.close
and
Main.rs.Open "SELECT * FROM Tbl_1 WHERE Txt=' " _
& frmkat.Ansl.List(frmkat.Ansl.ListIndex) & "'", Main.cn
Main.rs.MoveFirst
Do Until Main.rs.EOF
frmkat.IDkokansl.text = CStr(Main.rs.Fields("ID").value)
Main.rs.MoveNext
Loop
Main.rs.Close
--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
"Freddie70" <fredrik.stahle@xxxxxxxxxxxx> wrote in message
news:1141296990.813425.266290@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have a problem with the sort order when running the comman "ORDER BY"
in a Pocket Access database.
I have a database MYDB.cdb that's include a table ("Tbl_1") with two
columns ("ID", "Txt")
In my app (written in eVb) i run the following:
Main.rs.Open "SELECT * FROM Tbl_1 ORDER BY Txt", Main.cn
Main.rs.MoveFirst
For i = 1 To Main.rs.RecordCount
frmkat.Ansl.AddItem (Main.rs.Fields(1).value)
Main.rs.MoveNext
Next i
Main.rs.close
The data in column "Txt" is text in swedish (includes the letters "Å",
"Ä", "Ö").
When i run the above in a HP 5550 with PPC 2003 the sort order is
correct that means the letter "A" is sorted before the letters "Å" and
"Ä".
In a HP 6515 with PPC 2003 Phone_Edition the sort order is incorrect,
letters "Å" and "Ä" is sorted before "A".
The main problem occurs after I have populated the combobox ("Ansl").
When selecting a new item in "Ansl" i run the following (and gets a EOF
error for items incl. "Å","Ä" and "Ö")
Main.rs.Open "SELECT * FROM Tbl_1 WHERE Txt=' " &
frmkat.Ansl.List(frmkat.Ansl.ListIndex) & "'", Main.cn
Main.rs.MoveFirst
For i = 1 To Main.rs.RecordCount
frmkat.IDkokansl.text = CStr(Main.rs.Fields("ID").value)
Next i
Main.rs.Close
Any ideas what might be the problem?
.
- References:
- Sort order in PocketAccess with PPC 2003_Phone edition
- From: Freddie70
- Sort order in PocketAccess with PPC 2003_Phone edition
- Prev by Date: Re: WM 5.0 and ADOCE/Net Framework
- Next by Date: Re: Database for a WM5 device
- Previous by thread: Sort order in PocketAccess with PPC 2003_Phone edition
- Next by thread: How to get WMV9 Encoder properties using IPropertyBag ???
- Index(es):
Relevant Pages
|