FileNotFindException was unhandled - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

FileNotFindException was unhandled

gsm07gsm07 Posts: 2Member
hi guys.just want a help in this codes. i use radiobutton for my search. i use to choose radiobutton Sidnum(school id number) to search a student. the problem with this is the picture from my DB doesnt view. the error said [color=Red]FileNotFindException was unhandled[/color] and pointing to this code [color=Red]PictureBox1.Image = Image.FromFile("C:UsersYouStyleDesktopNew System ADMIN OnlyADMINSystemofHolyRedeemerCampusPictureData" & frmLogin.userpics & "")[/color]. guys help please.. :( i think the problem with this is this code [color=Red]& frmLogin.userpics & [/color]. i dont know what code will i use to retrieve the picture form my DB


If RBBSiDnum.Checked Then

IDA = New OleDbDataAdapter
IDA.SelectCommand = New OleDbCommand("Select * from tblStudentData where tblStudentData.SchooliDNum='" & txtSearch.Text & "'", cn)
IDS.Clear()
IDA.Fill(IDS)
If IDS.Tables(0).Rows.Count > 0 Then

dt = New DataTable("Temp")
cmd = New OleDbCommand("Select * from tblStudentData where tblStudentData.SchooliDNum='" & txtSearch.Text & "'", cn)
cn.Open()

dr = cmd.ExecuteReader()
dt.Clear()
For Me.i = 0 To dr.FieldCount - 1
dt.Columns.Add(dr.GetName(i), dr.GetFieldType(i))
Next
While dr.Read
Dim drw As DataRow = dt.NewRow
For Me.i = 0 To dr.FieldCount - 1
drw(i) = dr(i)
Next
dt.Rows.Add(drw)
End While
dr.Close()
cn.Close()
Remove_Binding()
Add_Binding()
PictureBox1.Image = Image.FromFile("C:UsersYouStyleDesktopNew System ADMIN OnlyADMINSystemofHolyRedeemerCampusPictureData" & frmLogin.userpics & "")
Sign In or Register to comment.