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

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.