Re: Challenging Sort Order for a returned recordset



"Gary Bouchard" <GaryBouchard@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:11F4F1DD-94E2-4E9E-AAE5-ED76FB9A9778@xxxxxxxxxxxxxxxx

Sorry for the delay. The backend database can be SQL Server, MYSql or
Access.

I am using an Remote data control with the bound grid... connecting via a
DSN.

Actually I was manually adding the items from a resulting query, but your
previous message made me think of trying the remote data control and using
the grid bound.

Wait, you just said you WERE using a "bound grid" and now you say you're
adding items manually??? Which one?

Since I am using the remote data control, I am currently just passing
"select * from workstations" to populate the grid.

Now what I want ot do is discover the name of the current computer, and
make
sure that it is at the top of the grid.

I can go back to manual entry easily if that is what it takes.

If I were doing it manually I'd just filter the recordset to get the current
computer's data, add it to the grid, and then re-filter the recordset to
exclude the current computer and fill the rest of the grid.

Since you stated the back-end database could change, the UNION statement
Steve mentioned should be the most compatible. If it were only SQL Server,
I'd use a CASE statement to generate the sort key.


.



Relevant Pages

  • Re: Challenging Sort Order for a returned recordset
    ... I was adding the records manually to the grid unbound until yesterday. ... I am using an Remote data control with the bound grid... ... Since you stated the back-end database could change, the UNION statement ... workstation record and add that to the grid, ...
    (microsoft.public.vb.general.discussion)
  • Using MFC: RDO data binding works if set up at design time but not in code
    ... remote data control. ... In OnInitDialog, I set up m_rdc and then ... datasource property for grid in design time, ... DavidB ...
    (microsoft.public.win32.programmer.ole)
  • Re: Navigating and updating with datagrid and adodc
    ... First thing, if you expect to be working with the grid very much at all, you ... > existing line or a new line (AddNew). ... a clone of the recordset that underlies the grid's data source. ... > SQL-server differs from those like DataGrid and the like. ...
    (microsoft.public.vb.database.ado)
  • Re: Datagrid multiple row selections
    ... > This is brilliant, Mark, thank you very much. ... alter the recordset for the grid with selected rows. ... is use that selection to change other grids, ...
    (microsoft.public.vb.database.ado)
  • Re: Am I crazy?
    ... I expect your application design needs a bit of tuning to fetch fewer rows ... > Continual validation for several fields in the WillMove/MoveComplete (this ... > display in the grid). ... > idea to do this with such a large recordset and so much validation. ...
    (microsoft.public.data.ado)