Visual Basic

Moderators: None (Apply to moderate this forum)
Number of threads: 17974
Number of posts: 55343

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
FileNotFindException was unhandled Posted by gsm07 on 4 Jan 2013 at 10:26 PM
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 FileNotFindException was unhandled and pointing to this code PictureBox1.Image = Image.FromFile("C:\Users\YouStyle\Desktop\New System ADMIN Only\ADMINSystemofHolyRedeemer\CampusPictureData\" & frmLogin.userpics & ""). guys help please.. :( i think the problem with this is this code & frmLogin.userpics & . 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:\Users\YouStyle\Desktop\New System ADMIN Only\ADMINSystemofHolyRedeemer\CampusPictureData\" & frmLogin.userpics & "")



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.