There is an application that works as a client for the database (Access). The database has a number of images that are stored as hyperlinks (for example, D: \ Database \ Image1.png). Images are stored on a network drive. When requested, the data is displayed in the dataGridView using oledb:

private void button1_Click(object sender, EventArgs e) { OleDbDataAdapter dataada2 = new OleDbDataAdapter("SELECT * FROM Таблица1", oleDbWay); DataSet dataset1= new DataSet(); dataada2 .Fill(dataset1, "Adapt"); dataGridView1.DataSource = dataset1.Tables[0]; } 

Accordingly, when you run the program in the data view links appear. Tell me how to make sure that when you start the program, the images themselves will appear instead of the links (if that is possible). [SPOILER] Maybe you should use the ole data type in the database for image strings? The field itself in this case should go as a link to the image? [/ SPOILER]

  • I correctly understood the example of the link - are the images stored on the server next to the database? Well then the server should read these files and give them in the results of the query. And how, depends on the database, about which you have not written a word. If the Images are stored on a ball accessible to the client, then the client can get them himself, then merge the request data and the downloaded files and display it on the grid. The question needs to be clarified - rdorn
  • Thanks for the comment, changed the question. It is necessary that when outputting to the grid, the links are displayed as images or when the link is clicked, the image is opened. - Georg96
  • Ok, but one of the questions you have not answered. Does the client program have direct access to the images or not? Is the database remote or local (on the same machine as the client)? - rdorn
  • one
    The dataGridView has an onRowAnd () type "navrodi", in the handler of which you upload a file with an image (BitMap) at the address obtained from the database, and then "push" BitMap into a column of the desired type added by handles to the dataGridView. This is a general scheme, I can’t help you more now, if you don’t manage it yourself, then tomorrow I will try, if you have time, to give you more details. - Alexander Muksimov
  • Yes of course. Both the program and the images themselves are on the same computer. - Georg96

0