473,397 Members | 2,116 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Shorting records in a data table

Here is the question :

I have a data table, UnShorted, which has a data column EventTime (type :
date time) and a data column Values (type : single).

I want to create a table, Shorted, that will have all values of UnShorted
but they will be shorted by EventTime.
I try this :

dim Results as New DataRow( ) = UnShorted.Select ( "EventTime=EventTime" ,
"EventTime" )

Dim Shorted as New DataTable
Shorted=Unshorted.Clone( )

For each exRow as DataRow in Results

Shorted.ImportRow ( exRow )

Next exRow

Shorted.AcceptChanges
When I see the results, the records in data table Shorted are not shorted...

Why?

Thank you in advance,
Vasilis
Nov 21 '05 #1
1 1577
Only the returned DataRow array from Select() method will be sorted. Row
order may not be preserved when importing them to another datatable.

-Siva

"Vasilis X" <so*****@somewhere.com> wrote in message
news:e3**************@TK2MSFTNGP10.phx.gbl...
Here is the question :

I have a data table, UnShorted, which has a data column EventTime (type :
date time) and a data column Values (type : single).

I want to create a table, Shorted, that will have all values of UnShorted
but they will be shorted by EventTime.
I try this :

dim Results as New DataRow( ) = UnShorted.Select ( "EventTime=EventTime" ,
"EventTime" )

Dim Shorted as New DataTable
Shorted=Unshorted.Clone( )

For each exRow as DataRow in Results

Shorted.ImportRow ( exRow )

Next exRow

Shorted.AcceptChanges
When I see the results, the records in data table Shorted are not shorted...

Why?

Thank you in advance,
Vasilis

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: tom | last post by:
I am new to SQL administration. >From a list of IDs that are the primary key in one table (i.e. Customer Table), I want to make changes in tables that use those IDs as a foreign key. ...
28
by: Lee Rouse | last post by:
Hello all, This is going to be a rather lengthy "question". I have an Access 2k database, separated front end/back end. Front end copies are on about 30 workstations and used frequently during...
6
by: Robin S. | last post by:
**Eric and Salad - thank you both for the polite kick in the butt. I hope I've done a better job of explaining myself below. I am trying to produce a form to add products to a table (new...
5
by: Grant | last post by:
Hi Is there a way to recover deleted records from a table. A mass deletion has occurred and Access has been closed since it happened Louis
11
by: kaisersose1995 | last post by:
Hi, I've got an import procedure working, using a standard import specification to import a .csv file into a temporary table. The problem i'm having is that i have 4 different sets of borrower...
3
by: wvmbark | last post by:
First time poster... I just found this forum and it appears there's plenty of people here that could make short work of problem that's been driving me absolutely bonkers for months. Every day we...
11
by: shriil | last post by:
Hi I have this database that calculates and stores the incentive amount earned by employees of a particular department. Each record is entered by entering the Date, Shift (morn, eve, or night)...
1
by: priyadarshi123 | last post by:
Hi I am Priyadarshi I am facing problem when using shorting in GridView. Can you explain me how to use shorting in GridView,With an example of code in HTML Thank u.
3
by: chriskaza81 | last post by:
i have a problem in a query like select field1, field2 from table1 order by field1 field1 contains countries (varchar2) the problem is that order by not shorting...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.