recordset and I am getting the following values in the dropdown
System.Data.DataRowView and not the expected content that should be
appearing in there. I have stepped through the code in debug mode and
examine the value of the recordset, and the right values seem to be there.
Any idea what is causing this and how to fix it so that it does not show up
like this?
..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
--
J.Daly
structure:interactive
Ph: 616-364-7423
Fx: 616-364-6941
http://www.structureinteractive.comSe the DataText and DataVauleField properties BEFORE the DataBind().
DataBind() binds your source to your control, setting what to bind after
doesn't work :)
Karl
"Irishmaninusa"
<jdaly@.structuctureinteractive.com.takemeoffifyouwa ntoemailme> wrote in
message news:u3boxQ3iEHA.2992@.TK2MSFTNGP12.phx.gbl...
> I am trying to populate a drop down on a form with the contents of a
> recordset and I am getting the following values in the dropdown
> System.Data.DataRowView and not the expected content that should be
> appearing in there. I have stepped through the code in debug mode and
> examine the value of the recordset, and the right values seem to be there.
> Any idea what is causing this and how to fix it so that it does not show
up
> like this?
>
>
> .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
>
> --
> J.Daly
> structure:interactive
> Ph: 616-364-7423
> Fx: 616-364-6941
> http://www.structureinteractive.com
I thought I had did that before and it still didn't work, but I tried it
again and this time it work. Now I have different issue, the stored
procedure I call pulls back date values in order, where the most recent date
is at the top and it goes back in order.
7/28/2004
7/1/2004
6/30/2004
This is the where the stored procedure pulls back the dates, which is
correct. However in the drop down it is being displayed as
7/28/2004
6/30/2004
7/1/2004
Why would this be like this?
"Karl" <karl REMOVE @. REMOVE openmymind REMOVEMETOO . ANDME net> wrote in
message news:OzuKbe3iEHA.636@.TK2MSFTNGP12.phx.gbl...
> Se the DataText and DataVauleField properties BEFORE the DataBind().
> DataBind() binds your source to your control, setting what to bind after
> doesn't work :)
> Karl
> "Irishmaninusa"
> <jdaly@.structuctureinteractive.com.takemeoffifyouwa ntoemailme> wrote in
> message news:u3boxQ3iEHA.2992@.TK2MSFTNGP12.phx.gbl...
> > I am trying to populate a drop down on a form with the contents of a
> > recordset and I am getting the following values in the dropdown
> > System.Data.DataRowView and not the expected content that should be
> > appearing in there. I have stepped through the code in debug mode and
> > examine the value of the recordset, and the right values seem to be
there.
> > Any idea what is causing this and how to fix it so that it does not show
> up
> > like this?
> > .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
> > --
> > J.Daly
> > structure:interactive
> > Ph: 616-364-7423
> > Fx: 616-364-6941
> > http://www.structureinteractive.com
I honestly don't know. I can see that you are using OLEdbClient which I'm
no expert at. Are these Date fields or string/varchar fields? you may want
to start a new thread asking this question and identifying the
database/query/schema so that someone better suited will help.
Karl
"Irishmaninusa"
<jdaly@.structuctureinteractive.com.takemeoffifyouwa ntoemailme> wrote in
message news:e2sIEo3iEHA.536@.TK2MSFTNGP11.phx.gbl...
> I thought I had did that before and it still didn't work, but I tried it
> again and this time it work. Now I have different issue, the stored
> procedure I call pulls back date values in order, where the most recent
date
> is at the top and it goes back in order.
> 7/28/2004
> 7/1/2004
> 6/30/2004
> This is the where the stored procedure pulls back the dates, which is
> correct. However in the drop down it is being displayed as
>
> 7/28/2004
> 6/30/2004
> 7/1/2004
> Why would this be like this?
> "Karl" <karl REMOVE @. REMOVE openmymind REMOVEMETOO . ANDME net> wrote in
> message news:OzuKbe3iEHA.636@.TK2MSFTNGP12.phx.gbl...
> > Se the DataText and DataVauleField properties BEFORE the DataBind().
> > DataBind() binds your source to your control, setting what to bind after
> > doesn't work :)
> > Karl
> > "Irishmaninusa"
> > <jdaly@.structuctureinteractive.com.takemeoffifyouwa ntoemailme> wrote in
> > message news:u3boxQ3iEHA.2992@.TK2MSFTNGP12.phx.gbl...
> > > I am trying to populate a drop down on a form with the contents of a
> > > recordset and I am getting the following values in the dropdown
> > > > System.Data.DataRowView and not the expected content that should be
> > > appearing in there. I have stepped through the code in debug mode and
> > > examine the value of the recordset, and the right values seem to be
> there.
> > > > Any idea what is causing this and how to fix it so that it does not
show
> > up
> > > like this?
> > > > > > > > .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
> > > > > --
> > > J.Daly
> > > structure:interactive
> > > Ph: 616-364-7423
> > > Fx: 616-364-6941
> > > > http://www.structureinteractive.com
> > >
Thanks Karl, I will see what turns up. Thank you for your help to my earlier
issue.
"Karl" <karl REMOVE @. REMOVE openmymind REMOVEMETOO . ANDME net> wrote in
message news:umG6hJ4iEHA.1376@.TK2MSFTNGP11.phx.gbl...
> I honestly don't know. I can see that you are using OLEdbClient which I'm
> no expert at. Are these Date fields or string/varchar fields? you may
want
> to start a new thread asking this question and identifying the
> database/query/schema so that someone better suited will help.
> Karl
> "Irishmaninusa"
> <jdaly@.structuctureinteractive.com.takemeoffifyouwa ntoemailme> wrote in
> message news:e2sIEo3iEHA.536@.TK2MSFTNGP11.phx.gbl...
> > I thought I had did that before and it still didn't work, but I tried it
> > again and this time it work. Now I have different issue, the stored
> > procedure I call pulls back date values in order, where the most recent
> date
> > is at the top and it goes back in order.
> > 7/28/2004
> > 7/1/2004
> > 6/30/2004
> > This is the where the stored procedure pulls back the dates, which is
> > correct. However in the drop down it is being displayed as
> > 7/28/2004
> > 6/30/2004
> > 7/1/2004
> > Why would this be like this?
> > "Karl" <karl REMOVE @. REMOVE openmymind REMOVEMETOO . ANDME net> wrote
in
> > message news:OzuKbe3iEHA.636@.TK2MSFTNGP12.phx.gbl...
> > > Se the DataText and DataVauleField properties BEFORE the DataBind().
> > > > DataBind() binds your source to your control, setting what to bind
after
> > > doesn't work :)
> > > > Karl
> > > > "Irishmaninusa"
> > > <jdaly@.structuctureinteractive.com.takemeoffifyouwa ntoemailme> wrote
in
> > > message news:u3boxQ3iEHA.2992@.TK2MSFTNGP12.phx.gbl...
> > > > I am trying to populate a drop down on a form with the contents of a
> > > > recordset and I am getting the following values in the dropdown
> > > > > > System.Data.DataRowView and not the expected content that should be
> > > > appearing in there. I have stepped through the code in debug mode
and
> > > > examine the value of the recordset, and the right values seem to be
> > there.
> > > > > > Any idea what is causing this and how to fix it so that it does not
> show
> > > up
> > > > like this?
> > > > > > > > > > > > > > .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
> > > > > > > > --
> > > > J.Daly
> > > > structure:interactive
> > > > Ph: 616-364-7423
> > > > Fx: 616-364-6941
> > > > > > http://www.structureinteractive.com
> > > > > > > >
0 comments:
Post a Comment