LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Database data corrupted upon retrieval?

Hi All, this question regards an issue I'm having with the Database Connectivity Toolkit, 1.0.1.
I'm retreiving a record (a bunch of records actually) from a Jet database and creating a 2-D table that SHOULD be sorted by time, as that is how the data has been collected.  In short runs the data is time-linear.
However, more recent runs with longer data sets is returning data that is being reported in scattered out-of-sequence blocks.  I know, that's not very clear.
 
I'm collected data points (from a 3-rd party hardware) that includes index #s, timestamps, etc for each data point.  They are saved in a Jet database.
When I open that database with Access and review the records as a 2-D array, the data is sorted with respect to time.
However, when I use the DB Toolkit to retrieve the same data, it looks exactly the same except it looks like somebody imported it into Excel, randomly selected a continguous block of rows, then cut-and-pasted the data elsewhere.   The shifted data blocks look random in both size and movement.
Because all the data is there and not corrupted, I can fix the problem by doing an Excel 2-D data sort based on the timestamp, but I shouldn't have to do this, should I?  I'm aware that 'sorted' data is not neccessarily a condition of the database data, but Access seems to find it that way.  Perhaps there is an SQL command that will fix the sorting problem?  I know nothing about databases or SQL language.
thanks,
Matt
0 Kudos
Message 1 of 2
(2,173 Views)

Access, by default, probably sorts the data by using the key or, if there is no key defined, probably by the first column.

If the table does not have a key then it is possible that Access is automatically displaying it sorted even though it isn't really sorted.

Anyway, to sort in an SQL query, you use Order By. For example, "Select ColA, ColB, ColC From TableA Order By ColB".


___________________
Try to take over the world!
0 Kudos
Message 2 of 2
(2,166 Views)