数百回に1回、ライフサイトでエラーが発生します。私はチェックし、テストし、テストしてきましたが、何が悪いのか見当がつかないのです。誰か明るいアイデアはありますか?
コードは次のとおりです。
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:オブジェクト参照がオブジェクトのインスタンスに設定されていません。