Avatar of running32
running32

asked on 

error in dataset

My sub routine keeps giving me an out of memory error when it tries to execute  programmatch = DataSet901.Tables("tblrecordsmanagement").Rows(i).Item("program")  There is one row retruned in the recordset.  Can someone tell me what programming mistake I have made. Thank you


 DataSet901.Clear()
        SqlDataAdapter2.SelectCommand.Parameters("@param9").Value = lngpatientid
        Dim rowCount As Integer = SqlDataAdapter2.Fill(DataSet901)
        Dim i
        i = 0
        MsgBox(rowCount)
        Do While rowCount <> i
            Dim programmatch
            programmatch = DataSet901.Tables("tblrecordsmanagement").Rows(i).Item("program")
            i = i + 1
            If programmatch = "PA" Then
                Label25.BackColor = Color.Red
                CheckBox5.Checked = True
            End If

            If programmatch = "Medical Services" Then
                Label27.BackColor = Color.Red
                CheckBox4.Checked = True
            End If
            If programmatch = "Dental" Then
                Label26.BackColor = Color.Red
                CheckBox3.Checked = True
            End If
            If programmatch = "HP" Then
                Label25.BackColor = Color.Red
                CheckBox5.Checked = True
            End If
            If programmatch = "Connections" Then
                Label28.BackColor = Color.Red
                CheckBox2.Checked = True
            End If
        Loop
Visual Basic.NET

Avatar of undefined
Last Comment
running32
SOLUTION
Avatar of bchoor
bchoor
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
ASKER CERTIFIED SOLUTION
Avatar of Sancler
Sancler

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of running32
running32

ASKER

Thank you for you help.  I figured it out.
Visual Basic.NET
Visual Basic.NET

Visual Basic .NET (VB.NET) is an object-oriented programming language implemented on the .NET framework, but also supported on other platforms such as Mono and Silverlight. Microsoft launched VB.NET as the successor to the Visual Basic language. Though it is similar in syntax to Visual Basic pre-2002, it is not the same technology,

96K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo