I
Irishmaninusa
Hello Everyone,
I am populating a dropdown control from a database where the data is
datetime values. In my stored procedure I am ordering them by where the most
recent is at the top and the earliest is the last. So the following is
displayed in SQL Query Analyzer
7/28/2004
7/1/2004
6/302004
The above order is correct and that is the way I expect them to be displayed
in the drop down. However in the drop down they get displayed as follow(s):
7/28/2004
6/302004
7/1/2004
I am not exactly sure why it is being displayed like this, because when I
step through the code I can see it been put in the correct order, so I was
wondering if anyone had any ideas on this.
The code that is doing this is as follow(s):
ResetParameters()
..AddParameter("iMRN", OleDb.OleDbType.Integer, ParameterDirection.Input,
ctlHeader.PatientData("PatientMRN"))
'Pull back the list of encounters for the selected patient
If .Execute(.genuSql.StoreProcSelect, "selPatient_Billing") Then
Dim oRow As DataRow
oData = .DbData_DataTable
If .DbData_DataTable.Rows.Count > 0 Then
With drpEnc
..DataSource = oData
..DataBind()
..DataValueField = "id"
..DataTextField = "DateOfService"
End With
End If
Else
Throw New Exception(.ErrorMessage)
End If 'Encounter List
Any help would be appreciated.
JD
I am populating a dropdown control from a database where the data is
datetime values. In my stored procedure I am ordering them by where the most
recent is at the top and the earliest is the last. So the following is
displayed in SQL Query Analyzer
7/28/2004
7/1/2004
6/302004
The above order is correct and that is the way I expect them to be displayed
in the drop down. However in the drop down they get displayed as follow(s):
7/28/2004
6/302004
7/1/2004
I am not exactly sure why it is being displayed like this, because when I
step through the code I can see it been put in the correct order, so I was
wondering if anyone had any ideas on this.
The code that is doing this is as follow(s):
ResetParameters()
..AddParameter("iMRN", OleDb.OleDbType.Integer, ParameterDirection.Input,
ctlHeader.PatientData("PatientMRN"))
'Pull back the list of encounters for the selected patient
If .Execute(.genuSql.StoreProcSelect, "selPatient_Billing") Then
Dim oRow As DataRow
oData = .DbData_DataTable
If .DbData_DataTable.Rows.Count > 0 Then
With drpEnc
..DataSource = oData
..DataBind()
..DataValueField = "id"
..DataTextField = "DateOfService"
End With
End If
Else
Throw New Exception(.ErrorMessage)
End If 'Encounter List
Any help would be appreciated.
JD