problem in picture display...

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jul 2007
Posts: 113
Reputation: jaasaria is an unknown quantity at this point 
Solved Threads: 1
jaasaria's Avatar
jaasaria jaasaria is offline Offline
Junior Poster

problem in picture display...

 
0
  #1
Feb 11th, 2008
hi, i have a project here that can insert the picture in the database by binary. but the problem is to search it using the "find" this is the codes that i upload in the net...

Dim sourceFile As Integer
sourceFile = FreeFile
Open fileName For Binary Access Read As sourceFile
fileSize = LOF(sourceFile)

If fileSize = 0 Then
Close sourceFile
MsgBox "Employee's Photo is invalid"
Exit Sub

Else

Dim pictBlocks As Integer
pictBlocks = fileSize / BLOCK_SIZE

Dim leftOverData As Long
leftOverData = fileSize Mod BLOCK_SIZE

Dim pictData() As Byte
ReDim pictData(leftOverData)

Get sourceFile, , pictData()


rsemployee.AddNew


rsemployee("Photo").AppendChunk pictData()

ReDim pictData(BLOCK_SIZE)

Dim i As Integer
For i = 1 To pictBlocks
Get sourceFile, , pictData()
rsemployee("Photo").AppendChunk pictData()
Next i

rsemployee.Fields("EmployeeID") = txt1.Text
rsemployee.Fields("EmployeeName") = txt2.Text
rsemployee.Fields("EmployeePosition") = txt3.Text
rsemployee.Fields("Address") = txt4.Text
rsemployee.Fields("Age") = txt5.Text
rsemployee.Fields("Gender") = txt6.Text
rsemployee.Fields("PhoneNo") = txt7.Text

rsemployee.Update
Close sourceFile
End If


plzzzzzzzzz help me ......................
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 2,132
Reputation: debasisdas will become famous soon enough debasisdas will become famous soon enough 
Solved Threads: 132
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Postaholic

Re: problem in picture display...

 
0
  #2
Feb 13th, 2008
What is the problem with the code ?

Is that throwing any error ?
Share your Knowledge.
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 113
Reputation: jaasaria is an unknown quantity at this point 
Solved Threads: 1
jaasaria's Avatar
jaasaria jaasaria is offline Offline
Junior Poster

Re: problem in picture display...

 
0
  #3
Feb 13th, 2008
i dont have any idea in displaying it in the image in different user.

like in the text in the database...
rs!empID = text1.text




thxxxxxxx for replying..

jaasaria
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



Tag cloud for Visual Basic 4 / 5 / 6
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC