Goodnight everyone. Hope you can help me ... I made a C # software with a MySql database. In one of the tables I must save a PDF document in each record. Set that column as LONGBLOB. What I need to know is how to do so that when I choose an already saved record from the datagrid, the corresponding PDF is automatically loaded into the axacroPDF without having to download the file to the PC. I did a test but it throws me 2 errors and it doesn't work. I leave my code. MILLIONS OF THANKS !!!
- private void datagridpagos_CellContentClick(object sender, DataGridViewCellEventArgs e) {
- try {
- Pagos Form_Pagos = new Pagos();
- DataGridViewRow Volcado_Pagos = datagridpagos.Rows[e.RowIndex]; {
- foreach(Form frm1 in Application.OpenForms)
- if (frm1.Name == "Pagos") {
- Form_Pagos = (Pagos) frm1;
- Form_Pagos.txtboxproveedor.Text = datagridpagos.CurrentRow.Cells[1].Value.ToString();
- Form_Pagos.txtfechapago.Text = datagridpagos.CurrentRow.Cells[2].Value.ToString();
- Form_Pagos.txtmodalidad.Text = datagridpagos.CurrentRow.Cells[3].Value.ToString();
- Form_Pagos.txtimportepagado.Text = datagridpagos.CurrentRow.Cells[4].Value.ToString();
- Form_Pagos.VisorPDF.src = datagridpagos.CurrentRow.Cells[5].Value.ToString();
- this.Close();
- break;
- }
- }
- }
- catch(Exception ex) {
- MessageBox.Show(ex.Message);
- }
- }