I need to read from ms sql file to adobe PDF reader
Error is line 8
Error CS0029 Cannot implicitly convert type 'System.IO.MemoryStream' to 'string'
Some help?
- try
- {
- if (documentsDataGridView.SelectedRows[0].Cells["pdf_file"].Value != null)
- {
- byte[] ap = (byte[])documentsDataGridView.SelectedRows[0].Cells["pdf_file"].Value;
- MemoryStream ms = new MemoryStream(ap);
- axAcroPDF1.src = ms;
- }
- else {
- axAcroPDF1.src = null;
- }
- }
- catch
- {
- axAcroPDF1.src = null;
- }

Jenith ThakkarRank #789 · 2.9K reputationPosted Jul 18, 2018, 7:36 PM EDT
Goran BibicRank #993 · 2K reputationPosted Jul 18, 2018, 8:42 PM EDT
Goran BibicRank #993 · 2K reputationPosted Jul 19, 2018, 9:59 PM EDT
Goran BibicRank #993 · 2K reputationPosted Jul 19, 2018, 11:07 PM EDT