Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42220

[RESOLVED] Visual Studio Error in VB.Net Code

$
0
0
I am not sure if posting VS errors in here is acceptable, but here goes :)

This is my code that is giving me the trouble (if you need to see more, just let me know):
Code:

        Dim out As String = ""

        Dim tw As StreamWriter
        tw = New StreamWriter("Out.csv")

        out = ""
        For intLoopIndex As Integer = 0 To count - 1
            out = out & db_reader.GetValue(intLoopIndex).ToString() & ","
        Next intLoopIndex

The code hits this line
Code:

out = out & db_reader.GetValue(intLoopIndex).ToString() & ","
And throws an error of:
Invalid Operation Exception was unhandled
No data exists for the row/column

What is causing this error, and how do I get around it?

Viewing all articles
Browse latest Browse all 42220

Trending Articles



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