Hi,
Really changing from MS Accesss to mySql when using VB.Net will solve this problem. But i discover another way to get rid of this problem.
i created a procedure called conState see below
Public Sub conState()
If con.State = ConnectionState.Closed Then
con.Open()
End If
End Sub
So before any Update/select or insert statement i added
con.close()
call conState()
Like
For i = 0 to datagridview1.rowscount - 1
con.close
call conState()
con.Close()
con.Open()
cmd = New OleDbCommand("insert into SBCCourses (lvid, stid, course , Score , sem) values ('" & Lid & "','" & Sid & "','" & scode & "','" & sgrade & "' , '2' )", con)
cmd.ExecuteNonQuery()
cmd.Dispose()
Next
I find this really helpfull