はしかし、私はにそれを翻訳し(それが失敗し、私はこの例外を取得する私は、MySQLデータベースに対してクエリを実行している、そしてその文は単にSELECTクエリがあるため制限の失敗またはので、それは
SELECT * FROM tableOperationsHistory;
であると言います英語):
アクティブ化の制限がありません。 1つ以上の行には、 がnull以外の、一意または外部キー制限に違反する値が含まれています。
これは、エラーが発生したルーチンです:
Public Function RetrieveTable(ByVal command_text As String, Optional ByVal parameters As ParameterSet = Nothing) As DataTable
Dim dt As New DataTable, retry = False
Do
Using comm = conn.CreateCommand
comm.CommandText = command_text
If parameters IsNot Nothing Then
Dim par As DbParameter
For Each pair In parameters
par = comm.CreateParameter
par.ParameterName = pair.Key
par.Value = pair.Value
comm.Parameters.Add(par)
Next
End If
Dim rdr As DbDataReader
RequestConnection()
Try
rdr = comm.ExecuteReader
dt.Load(rdr)
retry = False
Catch ex As Exception
retry = ShouldRetry(ex) 'EXCEPTION IS CAUGHT HERE
End Try
DismissConnection()
End Using
Loop While retry
Return dt
End Function
そして、これはテーブル定義文である:
CREATE TABLE `tableOperationsHistory` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`numero` varchar(45) DEFAULT NULL,
`pasta_id` int(11) DEFAULT NULL,
`dataHoraInicioPrazo` datetime DEFAULT NULL,
`dataHoraFinalPrazo` datetime DEFAULT NULL,
`urgente` tinyint(4) DEFAULT NULL,
`setorOrigem_id` int(11) DEFAULT NULL,
`unidade_id` int(11) DEFAULT NULL,
`setor_id` int(11) DEFAULT NULL,
`usuario_id` int(11) DEFAULT NULL,
`modalidadeComunicacaoJudicial_id` int(11) DEFAULT NULL,
`modalidadeRepercussao_id` int(11) DEFAULT NULL,
`especieTarefa_id` int(11) DEFAULT NULL,
`postIt` varchar(255) DEFAULT NULL,
`teor_observacao` varchar(255) DEFAULT NULL,
`comunicacaoJudicial_id` int(11) DEFAULT NULL,
`tarefa_id` int(11) DEFAULT NULL,
`mensagens` text,
`criadoPor_id` int(11) DEFAULT NULL,
`criadoEm` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=92 DEFAULT CHARSET=latin1;
これはどのようにSELECT文の中で起こることができますか?私は何をすべきか?