i for example i save ppt in OLEDB OLE Object :-/ and i need to open this powerpoint file in my program how can i do that :|

thx for answers :|

Recommended Answers

All 4 Replies

Well! Please show us your code.

Public Sub resimkaydı(ByVal dosyayolu As String, ByVal açıklama As String, ByVal kişiindex As Integer) ''tamam

        Dim bytes() As Byte
        Try
            bytes = System.IO.File.ReadAllBytes(dosyayolu)
        Catch : MsgBox("Bu dosya bulunamadı veya yok")
        End Try

        Dim sindex As Integer
        If KayıtStringdosyalar = "&" Then
            sindex = Form1.VerilerDataSet.Resimler.Rows.Count
        Else
            sindex = kayıtidbulma(KayıtStringdosyalar)
        End If

        Dim cmd As New OleDb.OleDbCommand("insert into Resimler (Fileindex,File,Filenote) values (" & sindex & ",@File," & açıklama & ")", Form1.baglanti)
        cmd.Parameters.Add("@File", OleDb.OleDbType.Binary, bytes.Length).Value = bytes
      
        Try
            cmd.ExecuteNonQuery()
            resimindexekle(sindex, kişiindex)
            Dim asdf As DataRow = Form1.VerilerDataSet.Resimler.Rows(0)
            asdf(0) = sindex : asdf(1) = bytes : asdf(2) = açıklama
            Form1.VerilerDataSet.Resimler.Rows.Add(asdf)
            MsgBox("Data save successfully!")
        Catch ex As Exception
            '' MsgBox("Veri Kaydedilemedi :" & ex.ToString)
        End Try
    End Sub 


 Private Sub BREkle_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BREkle.Click

        OpenFileDialog1.Title = "Get Image"
        With OpenFileDialog1
            .Filter = "All Files|*.*|Bitmaps|*.bmp|GIFs|*.gif|JPEGs|*.jpg"
            .FilterIndex = 4
        End With
        If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
            Dim bytes() As Byte
            bytes = My.Computer.FileSystem.ReadAllBytes(OpenFileDialog1.FileName)
            PBByk.Image = Image.FromFile(OpenFileDialog1.FileName)
            PBByk.SizeMode = PictureBoxSizeMode.StretchImage
            PBByk.BorderStyle = BorderStyle.None
        End If
        resimkaydı(OpenFileDialog1.FileName, RTBResim.Text, TSTBindex.Text)
     '   resimler()

    End Sub

thats my save method i have "Resimler" tables for saving files i can save all files succesfuly but i dant know how can i use this files on OLE OBJ.

so no one wants to answer i really need it.. :)

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.