Re: sorting
- From: "boaz" <nospam@xxxxxxxxx>
- Date: Thu, 27 Apr 2006 10:55:00 -0700
When I sort the data using SQL, it come back differently.
It comes back like:
10
1a
1b
1c
10a
10b
11
2
3
4
5
6
7
8
9
instead of:
1a
1b
1c
2
3
4
5
6
7
8
9
10
10a
10b
But this is just the sorting. I still need to search the data.
Bottomline is that I need to limit the number of time for the program to
access the database... for sorting and searching. I need to do it locally
whatever possible.
"Jan Hyde" <StellaDrinker@xxxxxxxxxxxxxxxxxxx> wrote in message
news:rk2152hf7hk7dimuljk282e9f7vom6lh5p@xxxxxxxxxx
"boaz" <nospam@xxxxxxxxx>'s wild thoughts were released on
Wed, 26 Apr 2006 09:50:21 -0700 bearing the following fruit:
Data are stored in a database table with 6 columns having 3 columns as
the
primary key (1a, 1b, 1c, 2, 3,4,5,6,7,8,9,10,10a,10b,11, etc plus other
two). The table has couple thoursands records.
I need to read the table (or part of the table) to the local machine and
query the data locally.
There are two solutions. One is to use disconnect recordset. Another one
is to roll my own. So, I pick the second one to roll my own.
It was a no-brainer since the key was integer.
Now it is a little bit different. Need to find a way to enumerate the
data.
So, I can sort and search the stuff.
And idea?
I'm still not too clear on how you app is going to work.
If it were me I would query the database and bring back the
data in the required order, stick the data in a grid and
give the user the option of sorting on whichever column they
want.
I use the VSFlexgrid which has a handy feature that lets
users type the first few characters and the grid will jump
to that item.
In other places the user can simply query the
database again.
I guess this won't work for your app?
J
"Jan Hyde" <StellaDrinker@xxxxxxxxxxxxxxxxxxx> wrote in message
news:3jau429mlu1stb1v6v7d5ackcc61o5p2gv@xxxxxxxxxx
"boaz" <nospam@xxxxxxxxx>'s wild thoughts were released on
Tue, 25 Apr 2006 16:43:19 -0700 bearing the following fruit:
Doesn't VB6 come with some sort of built-in sorting function?
This is the problem of mine.
I have a bunch of stuffs using a number as the index... like:
1. Apple
2. Orange
3. Lemon
4. Pinapple
etc.
So I use the number as the index of the array... like:
Dim Fruits(4) As String
Fruits(1) = "Apple"
Fruits(2) = "Orange"
Fruits(3) = "Lemon"
Fruits(4) = "Pinapple"
So far so good.
Now, they (my paying customer) want to add a,b,c,d etc to the number...
like:
1. Apple
2. Orange
2a. Lemon
2b. Grape
3. Pinapple
How do you guys handle this kind of changes?
Well how is the data stored?
J
Jan Hyde (VB MVP)
--
Boat: A hole in the water surrounded by wood into which one pours money.
(Aaron Dragushan)
Jan Hyde (VB MVP)
--
Horse sense is a sure sign of a stable mind. (Very Punny)
.
- Follow-Ups:
- Re: sorting
- From: Jan Hyde
- Re: sorting
- References:
- sorting
- From: boaz
- Re: sorting
- From: Jan Hyde
- Re: sorting
- From: boaz
- Re: sorting
- From: Jan Hyde
- sorting
- Prev by Date: Re: Howto: Event Logging to own event log?
- Next by Date: Re: sorting
- Previous by thread: Re: sorting
- Next by thread: Re: sorting
- Index(es):
Relevant Pages
|
Loading