0
votes

my browse button have code like this.

'Dim dlg As New Microsoft.Win32.OpenFileDialog()
            ........................

            Dim result? As Boolean = dlg.ShowDialog()
            If result = True Then
                Dim filename As String = dlg.FileName
                brand_img.Source = New BitmapImage(New Uri(filename))
                tpath.Text = filename
            End If

then i want to save that image in my database. how cud it be possible? thanks for he help. i have a save button something like this...

cn.ConnectionString = "Provider=Microsoft.Ace.Oledb.12.0; Data Source=" & My.Application.Info.DirectoryPath.ToString() & "\mvdata.accdb;"
            cn.Open()

            If rs.State = True Then rs.Close()
            rs.Open("Select * from company", cn, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockOptimistic)

            If textbrname.Text = "" Or textbrdesc.Text = "" Then
                terr.Foreground = Brushes.Red
                terr.Text = "Please make sure that fields are not empty."
            Else
                rs.AddNew()
                rs("comp_imp").Value = ???????
                rs("comp").Value = textbrname.Text
                rs("comp_desc").Value = textbrdesc.Text
                rs.Update()
            End If
            rs.Close()
            cn.Close()

thanks again for the help...

1

1 Answers

0
votes

http://www.sourcecodester.com/visual-basic-net/5090/phone-book-using-vbnet-ms-access-2003.html

this is a simple program which store image in database ..may be this is helpful to you,