Hello,,,
I have created a application in vb.net 08, and i have one form for saving details about emp, now i also save photo in database, I am using SQL service based database, any idea how to Upload and Retrive a photo that we haved captured from the webcam.
The question is::
How to Upload photo from the webcam, and store in SQL database?
How to retrieve it to the form to show that on Form??
Please Help Me..
Thankss
@Nilesh
Capture Photo From WebCam In VB.NET 08
Page 1 of 17 Replies - 825 Views - Last Post: 17 March 2013 - 11:29 AM
Replies To: Capture Photo From WebCam In VB.NET 08
#2
Re: Capture Photo From WebCam In VB.NET 08
Posted 17 March 2013 - 07:51 AM
http://www.google.co...=UTF-8&oe=UTF-8
You store the photo as a byte[] in the database type of blob.
You store the photo as a byte[] in the database type of blob.
#3
Re: Capture Photo From WebCam In VB.NET 08
Posted 17 March 2013 - 08:01 AM
Sure.. storing in a byte array is fine, but I am also a large fan of storing the images in a folder and storing the location (and name) in the database to speed up searching and limit silly sized tables.
#4
Re: Capture Photo From WebCam In VB.NET 08
Posted 17 March 2013 - 08:17 AM
Agreed. But it can make more coding work. Now you have to make sure the database and the folder stay synchronized. If someone deletes photos from Windows Explorer because they don't know better, the database has to somehow 'know' that. Meaning you're dealing with SystemFolderWatchers etc.
Webcam pictures aren't large, and as a blob keeps everything together for say... An employee record of name, address, ID card photo, fingerprint bitmap for biometric sensor
Webcam pictures aren't large, and as a blob keeps everything together for say... An employee record of name, address, ID card photo, fingerprint bitmap for biometric sensor
#5
Re: Capture Photo From WebCam In VB.NET 08
Posted 17 March 2013 - 08:27 AM
True.. we have something similar at work, but in the code to retrieve the image it checks to make sure it is there first before trying to load it.. a small bit of validation...
On the other hand we have a process that was required we store a 100kb pdf in a blob.. that was dragging ass on our search times so we split the one table into two.. one for all the indexing information we would normally search on and the other with a foreign key to the first table and the blob.. search times came back to normal.
On the other hand we have a process that was required we store a 100kb pdf in a blob.. that was dragging ass on our search times so we split the one table into two.. one for all the indexing information we would normally search on and the other with a foreign key to the first table and the blob.. search times came back to normal.
#6
Re: Capture Photo From WebCam In VB.NET 08
Posted 17 March 2013 - 08:43 AM
We do something similar where the uniqueID of the employee is a GUID, which is then FK to the table with blobs.
#7
Re: Capture Photo From WebCam In VB.NET 08
Posted 17 March 2013 - 11:03 AM
modi123_1, on 17 March 2013 - 08:01 AM, said:
Sure.. storing in a byte array is fine, but I am also a large fan of storing the images in a folder and storing the location (and name) in the database to speed up searching and limit silly sized tables.
can you show me some examples, because i don't know anything about that, also no any idea, so Help me..
#8
Re: Capture Photo From WebCam In VB.NET 08
Posted 17 March 2013 - 11:29 AM
You are capturing the image, right? Generate a unique name.. heck even a sha1 would work.. Write the capture image to a file (filewriter, streamwriter, etc)... use basic SQL insert to write to a table the file name, date inserted, who inserted it, etc... and off you go.
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote







|