Hi, i would like to share you my problem in order to get solution `cause i gonna be crazy :(
Actualy when i do click to insert button in my form i get this error:
the strange is when i close this window and i do click again the insert button the record is successfully added the the database :(
here my insert code (the necessary because it`s so long):
Try
'build sql requests
Dim sqlQRY1 As String = "INSERT INTO AUDIO Values ('" + nomAudio + "')"
Dim sqlQRY2 As String = "INSERT INTO [IMAGE] Values ('" + nomImage + "')"
Dim sqlQRY3 As String = "INSERT INTO [TEST](Int_Exa,Rep_Correctes,Nom_Aud,Nom_Img) Values ('" + nomExamen + "','" + repTest + "','" + nomAudio + "','" + nomImage + "')"
'ouvrir la connexion
myConnexion.Open()
'build commands
Dim cmd1 As OleDbCommand = New OleDbCommand(sqlQRY1, myConnexion)
Dim cmd2 As OleDbCommand = New OleDbCommand(sqlQRY2, myConnexion)
Dim cmd3 As OleDbCommand = New OleDbCommand(sqlQRY3, myConnexion)
'requests execution
cmd1.ExecuteNonQuery()
cmd2.ExecuteNonQuery()
cmd3.ExecuteNonQuery()
MsgBox("Test successfully addes.", MsgBoxStyle.Information)
'closing connexion
myConnexion.Close()
Catch ex As Exception
MsgBox(ex.ToString)
Finally
myConnexion.Close()
End Try
i would ask why in first click he show me error but in the second it worked although it`s the same operation, the same form without changing anything in his components and fields . thx in advance.