hi
I want to capture the images into the database on certain time interval.
like when the user give the input of two time(time ::when they are saved in computer) . I have to capture the images which are already saved in the computer by checking the properties of image that whether they lie in that interval or not.If yes then capture this into the database otherwise not.
I know how to capture the images from the pc to database.........but I don't know how to check the properties of image file (jpeg format).I have seen microsoft http://support.microsoft.com/?kbid=224351 but i don't know how to use this in my program..................
my program uptill now is
This program is capturing images from pc to database...........
waiting for your reply.........
THANX..............
I want to capture the images into the database on certain time interval.
like when the user give the input of two time(time ::when they are saved in computer) . I have to capture the images which are already saved in the computer by checking the properties of image that whether they lie in that interval or not.If yes then capture this into the database otherwise not.
I know how to capture the images from the pc to database.........but I don't know how to check the properties of image file (jpeg format).I have seen microsoft http://support.microsoft.com/?kbid=224351 but i don't know how to use this in my program..................
my program uptill now is
VB.NET:
Dim strdata As String
Dim str1data As String
Dim strerror As String
strdata = ""
str1data = ("C:\tmp\webmd")
'Get Directory Info and list of images in specified dir...
Dim dirinfo As DirectoryInfo = New DirectoryInfo(str1data)
Dim filearray As FileInfo() = dirinfo.GetFiles("*.jpg")
'System.IO.FileInfo[] fileArray = dirInfo.GetFiles ("*.bmp")
'Connection Objects...
'Dim objconnection As New SqlConnection
Me.SqlConnection1.ConnectionString = "workstation id=DFXPCY81;packet size=4096;integrated security=SSPI;data source=""DF" & _
"XPCY81\RFIDLAB"";persist security info=False;initial catalog=HPD"
Dim fi As FileInfo
For Each fi In filearray
Dim ifilelength As Integer = fi.Length
strdata = fi.Name
Dim br As BinaryReader = New BinaryReader(fi.OpenRead())
Dim bImageData() As Byte = New Byte(ifilelength) {}
bImageData = br.ReadBytes(ifilelength)
'Open connection
Dim objconnection As SqlConnection = New SqlConnection(Me.SqlConnection1.ConnectionString)
objconnection.Open()
'Set Command Object text and params....
Dim objcommand As SqlCommand = New SqlCommand
objcommand.Connection = objconnection
objcommand.CommandText = "Insert into sumitImage values(@pImageData,@pImageName)"
objcommand.Parameters.Add("@pImageData", SqlDbType.Image)
objcommand.Parameters.Add("@pImageName", SqlDbType.VarChar)
objcommand.Parameters("@pImageData").Value = bImageData
objcommand.Parameters("@pImageName").Value = strdata
Try
'sqlcmdtaglist.ExecuteNonQuery()
'sqlcmdtaglist.Connection.Close()
objcommand.ExecuteNonQuery()
objconnection.Close()
objconnection.Dispose()
Catch ex As Exception
MessageBox.Show(ex.ToString)
' strerror = ex.Message
strerror = Nothing
End Try
Next
waiting for your reply.........
THANX..............
Last edited by a moderator: