0
한 번 몇 백 번에 한 번씩 개체를 잃어버린 생명의 사이트에 오류가 발생했습니다. 나는 검사를하고 테스트를 해왔지만, 무엇이 잘못되었는지 실마리가 없습니다. 누구나 밝은 아이디어가 있습니까?개체 참조가 MYSQLcommand에있는 개체의 인스턴스로 설정되지 않았습니다.
코드는 :
는Dim MySqlCommand = New MySqlCommand(SQLC, MySqlConnect)
Try
Tries = 5
lg &= " Co("
Do
Try : MySqlCommand.Connection.Open()
Catch ex As Exception
lg &= " " & ex.Message
Wait(0.5)
End Try
If (MySqlCommand.Connection.State <> ConnectionState.Open) Then Tries -= 1
Loop While Tries > 0 And MySqlCommand.Connection.State <> ConnectionState.Open
lg &= ")"
Catch ex As Exception
lg &= ex.message
End Try
lg &= " " & LCase(Left(SQLC, 5)) & "(Mc"
Try
lg &= "En" : Dim ret = MySqlCommand.ExecuteNonQuery()
lg = ""
Catch ex As Exception
lg &= ":" & ex.message
End Try
if lg<>"" then Response.write(lg)
출력은 :
CO() UPDAT (McEn :. 개체의 인스턴스로 설정되지 않은 개체 참조