Saturday, March 31, 2012

How To Store an Image to image SQL Server Data type Using C#


Note: It is not recommended to use this method if you want to store a large amount of images (ex. gallery). Instead, try storing images in an external file and use image path as an [nvarchar] data type.

Image in real is a set of color points arranged a certain way to form a picture, in computer language color point called Pixel, each pixel is a combination of different values of Red, Green & Blue (RGB), computer dealing with image as a series of bytes, each byte represent an image pixel, image data type in SQL Server can store up to  (2,147,483,647) bytes.

In this example i used a Picture Box as an image input way, then converted the input image to array byte

       
private static byte[] imagetoByte(Image img)
        {
            MemoryStream ms = new MemoryStream();
            img.Save(ms, System.Drawing.Imaging.ImageFormat.Gif);
            return ms.ToArray();
        }

       Byte[] img = imagetoByte(PictureBox1.Image);

For more details watch this video


and download the source code for experiment purposes 

 

Thursday, March 29, 2012

How to Create and Publish a Data Cube using SQL Server Analysis Services

For data mining purposes, Microsoft developed a tool called  SQL Server Analysis Services,
with this tool you can analyze a large number of data, which is characterized as the accumulation of several years,and most large companies use data analysis tools for decision-making service


This video explain how to:
  • Create Data Cube using businesses intelligence development studio (BIDS)
  • Publish the project & Deploy it to SQL Server with analysis services tool
  • Doing some OLAP operation like (Slice, Dice, Pivot..)


Wednesday, March 28, 2012

welcome

MessageBox.show("Hello Word");
                        like a dot net code 

welcome everybody 

   I will post in this blog a technical subjects
   And I will dedicate a large portion of the threads in the Dot Net 
   I wish you interest