|
|
| |||||||
| Diğer Server Side Diller Perl/ CGI , ColdFusion, Python, Ruby |
| |
|
| | | LinkBack | Seçenekler |
| |||
| public void SaveImage(int P_ID) { Image foto = null; try { string path = AppDomain.CurrentDomain.BaseDirectory; SqlConnection connection = new SqlConnection(SqlHelper.ConnStr); string Query = "SELECT PersonelResim FROM dbo.Personel WHERE P_Resim IS NOT NULL and P_ID='" + P_ID + "'"; SqlCommand command1 = new SqlCommand(Query, connection); connection.Open(); byte[] img; img = (byte[])command1.ExecuteScalar(); CommandType.Text, Query); connection.Close(); if (img.Length > 0) { System.IO.MemoryStream stream = new System.IO.MemoryStream(img,true); stream.Position = 0; stream.Seek(0, System.IO.SeekOrigin.Begin); stream.Write(img, 0, img.Length); Bitmap bit = new Bitmap(stream); //<- Parameter is not valid hatası alıyorum burda pictureBox1.Image=bit ; } } catch (Exception ex) { string s=ex.Message.ToString(); //<- Parameter is not valid } } çok standart bir işlem ve hata mesajını alıyorum internette de çzöümü yok alternatif önerisi olan var mı? |
![]() |
| Bookmarks |
| Seçenekler | |
| |