0

Hello,
I'm currently working with an Access-DB and I already succeeded in getting and changing various datatypes per c# code.

public static DataTable GetBetreuer()
{
    conn.Open();
    dbCommand = new OleDbCommand("SELECT ID, Email, Name FROM Betreuer", conn);

    dbDataAdapter = new OleDbDataAdapter(dbCommand);
    DataTable resultDataTable = new DataTable();
    dbDataAdapter.Fill(resultDataTable);

    conn.Close();
    return resultDataTable;
}

That's pretty basic right now. What I now want to do, is to open an OLE-Object from the code. For example, if my OLE-Object in my Access DB is a pfd-file, I want to open it with the standard app for pdf-files. My other idea, in case it's not possible, was to copy the file in a temp dir and open it with Process.Start(). But I couldn't find anything related to working with any OLE-Object from code. Also add an OLE-Object.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343

2 Answers2

0

Are you talking about pdf files? I would recommend that you will get performance issues once your db size crosses certain limit rather you can save file path db and store the pdf somewhere on machine. You can follow the link for the same. Storing Documents as Blobs in a Database - Any disadvantages?

Community
  • 1
  • 1
  • Yes. I thought about that too, but I really don't want anyone on the network to access the data from the windows explorer. –  Apr 07 '17 at 06:20
  • If you have questions regarding the post, please ask them in the comments, don't post a answer. If you do post an answer don't make a link only answer, include some more information and/or code snippets. – Yep_It's_Me Apr 07 '17 at 06:28
0

You can set permissions on directory to restrict users. BTW please tell me you are working on windows app or web app.

  • WPF. I don't want to use dirs. It's not that much data I want to store, so I dont care about the size. –  Apr 07 '17 at 06:27