M
MarcG
I have a datatable that I create from scratch, first adding a bunch of
columns all of datatype String. The columns are named. There are no keys or
constraints defined for the table or the columns.
I programmatically load the table, one row at a time from a tab delimited
file (I can't use the Text Trieber for various reasons that are not
relevant). The records have a recognizable pattern and I verify after the
load that the rows are in the expected order.
I do a table.Select("not (TrialNo = '.')") and the rows come back ordered by
the TrialNo column.
Doing a table.Select("(not (BlockNo = '.')) and (TrialNo = '.')" ) produces
an ordering by BlockNo (the data is inconclusive about TrialNo ordering in
this case).
According to the docs, the data is supposed to come back ordered by primary
key if there is one (there is not in my table), or row insertion order.
Apparently in the absence of a primary key it is using the selected columns
as though I had coded:
datatable.Select("not (TrialNo = '.')", "TrialNo ASC")
This is a problem in my app. Since I am building the tables based on the
data in the files, I can't in general derive a sort expression that will put
everything back into insertion order, which is exactly what I want.
VS2005, Framework 2
Bug?? Work around?
Thx
Marc
columns all of datatype String. The columns are named. There are no keys or
constraints defined for the table or the columns.
I programmatically load the table, one row at a time from a tab delimited
file (I can't use the Text Trieber for various reasons that are not
relevant). The records have a recognizable pattern and I verify after the
load that the rows are in the expected order.
I do a table.Select("not (TrialNo = '.')") and the rows come back ordered by
the TrialNo column.
Doing a table.Select("(not (BlockNo = '.')) and (TrialNo = '.')" ) produces
an ordering by BlockNo (the data is inconclusive about TrialNo ordering in
this case).
According to the docs, the data is supposed to come back ordered by primary
key if there is one (there is not in my table), or row insertion order.
Apparently in the absence of a primary key it is using the selected columns
as though I had coded:
datatable.Select("not (TrialNo = '.')", "TrialNo ASC")
This is a problem in my app. Since I am building the tables based on the
data in the files, I can't in general derive a sort expression that will put
everything back into insertion order, which is exactly what I want.
VS2005, Framework 2
Bug?? Work around?
Thx
Marc