help..debug assertion failed in vb.net

Joined
Feb 27, 2008
Messages
1
Reaction score
0
hi,

i'm new in vb.net. i have a code that supposed to execute an exe file. then the exe file will produce a txt file. then, i want to read that txt file and put it in the sql database. but this error keep occur. please anybody, help me. thanks in advance.

here are the code :

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim extracProcess As New Process()
Process.Start("procc.exe")
Dim data As New SqlDataAdapter
Dim con As SqlConnection = New SqlConnection("...connection string...")
Using sw2 As StreamReader = New StreamReader("storedData.txt")
Dim temp As Integer = 0
For temp = 0 To All_codeDataGridView.Rows.Count - 1
If sw2.EndOfStream() = False Then
Dim sql1 As String
sql1 = "update temp set result = " & sw2.ReadLine() & " where feeder_id= " & All_codeDataGridView.Rows(temp).Cells("feeder_id_txt").Value
Using conn As New SqlConnection(con.ConnectionString)
Dim cmd3 As New SqlCommand(sql1, conn)
cmd3.Connection = conn
conn.Open()
cmd3.ExecuteNonQuery()
conn.Close()
End Using
End If
Next
sw2.Close()
End Using
End Sub

and the error :
 

Attachments

  • error.JPG
    error.JPG
    18.7 KB · Views: 334
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top