I Have created a movie database in visual studio 2008, and its just not saving my records to my access database, Can anyone help me, if it helps if you send me a PM i can send you the file

Thanks
Michael

Help is offered in the public forums, not through PM. Please post your code here and we can have a look.

Hi, Thanks for your reply, I have tried creating my database in VB6 and i ahve most of it working. One aspect that i am having issues with is saving an image to the database. I hsve uploaded my UI and code. Is there any chance you could help me get get images into my Database

Private Sub browse_Click()
    'Open Dialog Box
    Image.Picture = Nothing
    With CommonDialog1
        .DialogTitle = "Open Image File...."
        .Filter = "Image Files (*.gif; *.bmp *.png *.jpg *.jpeg)| *.gif;*.bmp; *.png; *.jpg; *.jpeg"
        .CancelError = False
         .ShowOpen
        If .FileName = "" Then
         Image.Picture = Nothing
       Else
         Image = .FileName
         Image.Picture = LoadPicture(.FileName)
       End If
    End With
End Sub

Private Sub cmdAddNew_Click()
datFilm.Recordset.AddNew
txtTitle.SetFocus
End Sub

Private Sub cmdFind_Click()
Dim strSearch As String

strSearch = InputBox("What is the Name of the Film You are looking for?", "Find Record")

If strSearch <> "" Then
    datFilm.Recordset.FindFirst "Title = '" & strSearch & "'"

    If datFilm.Recordset.NoMatch Then
        MsgBox "Record not found!", vbOKOnly + vbCritical, "Find a Record"
    End If

End If

End Sub

Private Sub cmdFirst_Click()
datFilm.Recordset.MoveFirst
End Sub

Private Sub cmdLast_Click()
datFilm.Recordset.MoveLast
End Sub
Private Sub cmdNext_Click()
datFilm.Recordset.MoveNext
If datFilm.Recordset.EOF Then
    MsgBox "At Last Record!", vbCritical + vbOKOnly, "Move Next"
    datFilm.Recordset.MovePrevious
End If
End Sub

Private Sub Command2_KeyPress(KeyAscii As Integer)
Dim VideoAddr As String
VideoAddr = Replace(URLAddr.Text, "/watch?v=", "/v/")
If KeyAscii = 13 Then
    WindowsMediaPlayer1.URL = VideoAddr
End If


End Sub

Private Sub OLE1_Updated(Code As Integer)

End Sub

Private Sub image_Click()
 LoadPictureFromDB (rstRecordset)
End Sub

Private Sub iImage_Click()
LoadPictureFromDB (rstRecordset)
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
Dim VideoAddr As String
VideoAddr = Replace(URLAddr.Text, "/watch?v=", "/v/")
If KeyAscii = 13 Then
    WindowsMediaPlayer1.URL = VideoAddr
End If

End Sub

Thanks Michael

save the binary picture to the access database.

Also try to convert your image to base 64 before saving to database. to save space..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.