2013-03-01 3 views
0

내 찾아보기 버튼에 이와 같은 코드가 있습니다.WPF : 이미지를 저장하여 액세스 하시겠습니까? 방법?

 
'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 

그런 다음 해당 이미지를 내 데이터베이스에 저장하려고합니다. 얼마나 진부한가? 그가 도와 줘서 고마워. 이 데이터베이스에 이미지를 저장하는 간단한 프로그램이 될 ..may되어 나는이 같은 저장 버튼을 뭔가 ... 도움을

다시 한번 감사

 
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() 

...

답변