please help me i am use visual basic language and sql server 2005 database i need code how to save picture and retrive picture
i create form
3 textbox
1 image
4 lable
3 Replies - 12859 Views - Last Post: 12 March 2009 - 09:30 AM
#1
save and retrieve image using vb 6 and sql server 2005
Posted 12 March 2009 - 04:19 AM
Replies To: save and retrieve image using vb 6 and sql server 2005
#2
Re: save and retrieve image using vb 6 and sql server 2005
Posted 12 March 2009 - 04:43 AM
Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.
Post your code like this:
Thanks.
Post your code like this:
Thanks.
#3
Re: save and retrieve image using vb 6 and sql server 2005
Posted 12 March 2009 - 05:24 AM
Dim rs As ADODB.Recordset
Dim cn As ADODB.Connection
Dim strStream As ADODB.Stream
Private Sub cmdLoad_Click()
If Not LoadPictureFromDB(rs) Then
MsgBox "Invalid Data Or No Picture In DB"
End If
End Sub
Private Sub cmdSelectSave_Click()
'Open Dialog Box
With dlgDialog
.DialogTitle = "Open Image File...."
.Filter = "Image Files (*.gif; *.bmp)| *.gif;*.bmp"
.CancelError = True
procReOpen:
.ShowOpen
If .FileName = "" Then
MsgBox "Invalid filename or file not found.", _
vbOKOnly + vbExclamation, "Oops!"
GoTo procReOpen
Else
If Not SavePictureToDB(rs, .FileName) Then
MsgBox "Save was unsuccessful :(", vbOKOnly + _
vbExclamation, "Oops!"
Exit Sub
End If
End If
End With
End Sub
#4
Re: save and retrieve image using vb 6 and sql server 2005
Posted 12 March 2009 - 09:30 AM
Apparently this is a common homework question. If you Google the first line of the cmdLoad_Click() subroutine, you'll find answers.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote





|