This message was edited by darthmoobey at 2005-5-11 11:57:49
: Hello,
:
: I'm trying to write a program, to keep track of employee data. I wish to include a webcam video stream, so when they are entering the employee name and information, they can take a webcam Snapshot and save the employee pic as a jpg, or gif in the database. I was hoping someone could have some information on the best place to try and find resource or code snippet on the best method to do this. I also am not sure if Microsoft Access has the ability to store picture data, like MySQL can. Would it be best for me to use MSDE2000 from microsoft, or will using Microsoft Access be ok for storing the picture data.
:
: I managed to find some information on ezVidCap Control. Though I am not sure if it will allow me to save as jpg and or gif into the database using ADO connection strings.
:
: Thank you anyone that can help.
:
: The Darthmoob
:
Okay... I have managed to work with this program, to capture a single Bitmap, and save it to the hard drive. I was wondering what would be the easiest method, to instead send it to the Microsoft Access Database OLE Field. Would I need to save the image to the hard drive, then send it to the database field, after which deleting the image? This is the code I ahve so far, and I keep getting Runtime Error Code 91
Object Variable or With Block Variable not Set.
Button Click Code:
Private Sub Command1_Click()
Open_ProvDB
Open_Harlingen
Dim Picture1 As Image
ezVidCap1.SaveDIB "c:\Providers\Picture.bmp"
With Picture1
.Picture = LoadPicture("c:\Providers\Picture.bmp")
End With
Harlingen.AddNew
Harlingen.Fields("Picture").Value = Pic1 '<--- Location of Error Code
Harlingen.Update
Picture1.Picture = Pic1
Kill "c:\Payroll\Picture.bmp"
End Sub
ADO Connection Code
Public ProvDB As New ADODB.Connection
Public Harlingen As New ADODB.Recordset
Function Open_ProvDB()
'Checking for instance of open connection, if open it will close
If ProvDB.State = adStateOpen Then
ProvDB.Close
End If
ProvDB.Open "Provider=Microsoft.Jet.OLEDB.4.0;persist security info =false;data source=C:\Providers\Providers.mdb"
End Function
Function Open_Harlingen()
If Harlingen.State = adStateOpen Then
Harlingen.Close
End If
'setting cursor and open information for recordset table
With Harlingen
.ActiveConnection = ProvDB
.CursorLocation = adUseClient
.CursorType = adOpenStatic
.LockType = adLockOptimistic
.Source = "SELECT * FROM Harlingen"
.Open
End With
End Function
I hope you all can help me.
The Darthmoob