filecopy uzantısını database yazdırma - Baskı Önizleme +- AccessTr.neT (https://accesstr.net) +-- Forum: Visual Basic 6 (https://accesstr.net/forum-visual-basic-6.html) +--- Forum: Visual Basic 6 Cevaplanmış Soruları (https://accesstr.net/forum-visual-basic-6-cevaplanmis-sorulari.html) +--- Konu Başlığı: filecopy uzantısını database yazdırma (/konu-filecopy-uzantisini-database-yazdirma.html) |
filecopy uzantısını database yazdırma - ancyra - 14/08/2009 ben ürünlere ait resimleri butonla açıp bu buton içerisinde de filecopy olayını gerçekleştiriyorum. Önce filecopy ile openfiledialog tan application.startuppath ile kopyalıyorum. buraya kadar herşey normal daha sonra pictureboxta resim görüntüle diyorum. oda tamam. ama kopyaladığım dosya uzantısını databasede text olarak yaz diyorum eski dosyanın bulunduğu konumu yazıyor. anlamadım nedendir. kodlar bunlar: Private Sub resimac_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles resimac.Click Dim res As New OleDbCommand Dim pdf As String Dim pdfyolu As String ofd.Filter = "Bitmap Dosyaları(*BMP)|*.bmp|Jpeg Dosyaları(*.JPG)|*.jpg|Tüm Dosyalar(*.*)|*.*" ofd.ShowDialog() pdfyolu = ofd.FileName For Each file As String In ofd.FileNames tbxresimyolu.Text = Application.StartupPath & "\images\" & file.Substring(file.LastIndexOf("\")) My.Computer.FileSystem.CopyFile(pdfyolu, tbxresimyolu.Text) urunresimpicture.SizeMode = PictureBoxSizeMode.StretchImage '''''buraya kadar herşey normal - kopyalama falan pdf = tbxresimyolu.Text res.Parameters.AddWithValue("Resim_Yolu", pdf) 'burada hata var. kopyalanan dosyanın uzantısını yazmıyor. res.Connection = b res.CommandType = CommandType.Text Next End Sub sorunu buldum. sorun kaydetme butonunda tekrardan openfiledialog uzantısını databaseye tanımlamışım onu düzelttim oldu. Cvp: filecopy uzantısını database yazdırma - Bilgisayarcı - 14/08/2009 Eyvallah |