Quantcast
Channel: Crystal Reports
Viewing all articles
Browse latest Browse all 1507

Object variable or With block variable not set

$
0
0

I am receiving this Message "Object variable or With block variable not set" I really would like to get over it. Please take a look on the piece of code.

 For i As Integer = 0 To textObjects.Count - 1
                    'Set the name of Column in TextObject.
                    textObjects(i).Text = String.Empty
                    If sdr.FieldCount > i Then
                        textObjects(i).Text = sdr.GetName(i)
                    End If
                Next


                'Load all the data rows in the Dataset.

THERE I GOT THE MESSAGE IN THE PIECE BELOW:
                While sdr.Read()
                    Dim dr As DataRow = dsLangues.Tables(0).Rows.Add()
                    For i As Integer = 0 To sdr.FieldCount - 1
                        dr(i) = sdr(i)
                    Next
                End While


Viewing all articles
Browse latest Browse all 1507

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>