التنبيهات التالية ظهرت :
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 864 - File: showthread.php PHP 7.4.33 (Linux)
File Line Function
/showthread.php 864 errorHandler->error



تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
[VB.NET] مشاهدة الصورة من قاعدة البيانات
#1
اريد عند الضغط علي الصف بية الصور بقاعدة البيانات  نقل ومشاهدة الصورة بداخل الخلية الي    PICTUREBOX

انا حاولت بالطريقة دية هيا بشتغل بيها لنقل قيم الخلايا الي تيكست بوكس لتعديل  عمود الصور رقم 3

ظهر الخطا التالي  Object reference not set to an instance of an object.

كود :
 Dim indx = DataGridView1.CurrentRow.Index
       DataGridView1.Rows(indx).Selected = True
       DataGridView1.FirstDisplayedScrollingRowIndex = indx
       product1_add.Label8.Text = DataGridView1(0, indx).Value.ToString()
       product1_add.TextBox1.Text = DataGridView1(1, indx).Value.ToString()
       product1_add.TextBox2.Text = DataGridView1(2, indx).Value.ToString()
       Dim stream As New MemoryStream()
       con.Open()
       Dim command As New OleDbCommand("select image_TB1 from TB1", con)
       Dim image As Byte() = DirectCast(command.ExecuteScalar(), Byte())
       stream.Write(image, 0, image.Length)
       con.Close()
       Dim bitmap As New Bitmap(stream)
       product1_add.PictureBox1.Image = bitmap
الرد }}}
تم الشكر بواسطة:


الردود في هذا الموضوع
مشاهدة الصورة من قاعدة البيانات - بواسطة محمد اسماعيل - 08-02-18, 05:56 PM


التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم