Saving encrypted picture
Submitted by suspect777 on Wednesday, January 13, 2010 - 21:46.
Language
this sample code explain on how to convert picture file into bytes and store to the database(ms access/sql server)....
Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.
Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.
FOR YOUR OWN SAFETY, PLEASE:
1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
Comments
Saving Image into Access DB
I really need your help.. am using VB.Net 2005
I developing a restaurant software, which I have design the database for the daily transaction. On the daily transaction form.
I have textboxes, which I do type the qty, price and I use a button to send does items into a listview. Upon buying all the food I would like the listview items to be sent into a the transaction database.
Secondly, I would also I have a table within the database which stores information about workers of a company. How do I save an image into an Access database.
Thank you
Sir, Thank you u. I
Sir,
Thank you u.
I Want
(15/01/2010-25/9/1977)
Year= 20 Years
Month=6 Months
Day=15 Days
Prog. Vb 6.0
My E-mail= [email protected]
Thank you
Age Count
i found some bug in my previous code so that i reupload it again...
^_^ mabuhay pinoy coders... hehehe
just try this one, i tested this source code and it works fine,
good luck, happy coding....
Dim strAge As String
Dim dteSubDate As Date
Dim intYr As Integer
Dim intMth As Integer
Dim intDay As Integer
Private Sub Command1_Click()
Dim x As Integer
strAge = ""
intYr = DateDiff("d", DTPicker1, Date)
intMth = DateDiff("d", DTPicker1, Date)
intDay = DateDiff("d", DTPicker1, Date)
intYr = intYr \ 365
dteSubDate = DateAdd("yyyy", intYr, DTPicker1)
If dteSubDate > Now Then
dteSubDate = DateAdd("yyyy", -1, dteSubDate)
wsDate = Format(dteSubDate, "mm/dd/yyyy")
intMth = DateDiff("m", wsDate, Now)
If wsDate > Now Then
intMth = intMth - 1
End If
intYr = intYr - 1
dteSubDate = DateAdd("m", intMth, dteSubDate)
wsDate = DateDiff("d", Now, dteSubDate)
If wsDate 1 Then
wsDate = -1 * wsDate
End If
If intYr = 1 Then
strAge = intYr & " Year " & intMth & " Month"
End If
If intYr > 1 Then
strAge = intYr & " Years " & intMth & " Months"
End If
If wsDate = 1 Then
strAge = strAge & " " & wsDate & " Day"
End If
If wsDate > 1 Then
strAge = strAge & " " & wsDate & " Days"
End If
Else
wsDate = Format(dteSubDate, "mm/dd/yyyy")
intMth = DateDiff("m", wsDate, Now)
wsDate = DateAdd("m", intMth, wsDate)
If wsDate > Now Then
intMth = intMth - 1
End If
dteSubDate = DateAdd("m", intMth, dteSubDate)
wsDate = Format(dteSubDate, "mm/dd/yyyy")
intDay = DateDiff("d", dteSubDate, Now)
'If intDay 1 Then
'intDay = -1 * intDay
'End If
' strAge = intYr & " " & intMth & " " & intDay
If intYr = 1 Then
strAge = intYr & " year"
End If
If intYr > 1 Then
strAge = intYr & " Years"
End If
If intMth = 1 Then
If intYr >= 1 Then
strAge = strAge & " " & intMth & " Month"
Else
strAge = intMth & " Month"
End If
End If
If intMth > 1 Then
If intYr >= 1 Then
strAge = strAge & " " & intMth & " Months"
Else
strAge = intMth & " Months"
End If
End If
If intDay = 1 Then
If intYr >= 1 Then
If intMth >= 1 Then
strAge = strAge & " " & intDay & " Day"
Else
strAge = strAge & " " & intDay & " Day"
End If
Else
If intMth >= 1 Then
strAge = strAge & " " & intDay & " Day"
Else
strAge = strAge & " " & intDay & " Day"
End If
End If
End If
If intDay > 1 Then
If intYr >= 1 Then
If intMth >= 1 Then
strAge = strAge & " " & intDay & " Days"
Else
strAge = strAge & " " & intDay & " Days"
End If
Else
If intMth >= 1 Then
strAge = strAge & " " & intDay & " Days"
Else
strAge = strAge & " " & intDay & " Days"
End If
End If
End If
'MsgBox (strAge)
End If
Text1 = strAge
End Sub
Age Count
Private Sub Command1_Click()
Dim iyears As Integer
Dim tmonth As Integer
Dim Bmonth As Integer
'
iyears = DateDiff("yyyy", "01/01/" & DatePart("yyyy", DTPicker1.Value), "01/01/" & DatePart("yyyy", Now)) - 1
tmonth = DatePart("m", Now)
Bmonth = DatePart("m", DTPicker1.Value)
'
Select Case tmonth
Case Is > Bmonth
iyears = iyears + 1
Case Is = Bmonth
If DatePart("d", DTPicker1.Value) = _
DatePart("d", Now) Then iyears = iyears + 1
MsgBox iyears
End Select
End Sub
Saving encrypted picture
Can u plz send me the documentation of the Saving encrypted picture ??? thankxxx.....this is my e-mail add (typron_hotmail.com)
Add new comment
- Add new comment
- 223 views