VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,713 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am using VB.Net to develop a a database When I am trying to update the record the following error message will appear
"Could not find file 'C:\Users\Ahmed\Documents\Visual Studio 2010\Projects\ETH-NADO Information Retrieving System\ETH-NADO Information Retrieving System\bin\Debug\OpenFileDialog1'"
This is the code:
If MsgBox("Are You Sure You Want to Update?" & keyid, vbYesNo + vbQuestion, "Update") = vbYes Then
Dim fsreader As New FileStream(OpenFileDialog2.FileName, FileMode.Open, FileAccess.Read)
Dim breader As New BinaryReader(fsreader)
Dim imgbuffer(fsreader.Length) As Byte
breader.Read(imgbuffer, 0, fsreader.Length)
fsreader.Close()
strsql = "update Test set [MissionCode]=@Mission,[TestType]=@TestType,[TestDate]=@TestDate,[Driver]=@Driver,[Place]=@Place,[Event]=@Event,[Analysis]=@Analysis,[Coordinator]=@Coordinator,[DCO]=@DCO,[Athl]=@Athl,[SportCode]=@SportCode,[DCF]=@DCF where MissionCode = [@Mission]"
acscmd.CommandText = strsql
acscmd.Connection = conn
acscmd.Parameters.AddWithValue("@Mission", mission.Text)
acscmd.Parameters.AddWithValue("@TestType", type.Text)
acscmd.Parameters.AddWithValue("(@TestDate", tdate.Text)
acscmd.Parameters.AddWithValue("@Driver", driver.Text)
acscmd.Parameters.AddWithValue("@Place", place.Text)
acscmd.Parameters.AddWithValue("@Event", tevent.Text)
acscmd.Parameters.AddWithValue("@Analysis", analy.Text)
acscmd.Parameters.AddWithValue("@Coordinator", coord.Text)
acscmd.Parameters.AddWithValue("@DCO", dco.Text)
acscmd.Parameters.AddWithValue("@Athl", ath.Text)
acscmd.Parameters.AddWithValue("@SportCode", sport.Text)
acscmd.Parameters.AddWithValue("@DCF", imgbuffer)
dbconnect()
acscmd.ExecuteNonQuery()
acscmd.Dispose()
Me.Close()
SelectCommand("Select * from Test", "Test")
Information.fillgrid()
bind_data()
'Information.filltext()
End If