пытается выполнить очень простой запрос и заполнить таблицу данных, но продолжает получать ошибку «Не удалось включить ограничения ...» (с помощью mysql ver 8.0.13).
Вот соответствующий код:
dim dt as new datatable
Using mycon As New MySqlConnection(...)
Using mycmd As New MySqlCommand("Select * from output_type where
is_active='Y';", mycon)
Try
mycon.Open()
using myread as mysqldatareader = mycmd.executereader
dt.load(myread)
end using
mycon.Close()
End Using
Catch ex As Exception
Finally
If mycon.State <> ConnectionState.Closed Then
mycon.Close()
End If
End Try
End Using
End Using
return dt
Я абсолютно уверен, что в таблице output_type нет нулевых значений, внешних ключей и т. Д. Это всего 9 строк !! Что может быть причиной ошибки.
Спасибо за помощь,
Daniel