( مرجع فایل - قابل ویرایش )
تعداد صفحه : 6
Saving an Image in a SQL Server Database Most of the web applications have a lot of images used in it. These images are usually stored in a web server folder and they are accessed by giving the relative path to the file with respect to the root folder of the website. .Net being the platform for distributed application now, ASP.Net can be used to store images that are small to be stored in a database like SQL Server 2000 and later versions. For this purpose the SQL Server database provides a data type called “image” which is used to store images in the database. To access these images stored in the database we will be using the ADO.Net classes. To find out how to insert and retrieve an image in to the SQL Server database, you can create a .aspx page which can have a HTMLInputFile control which is used to select the image file that is to be saved in the database. You can also create a textbox control in which you can add the image name or some comment or an image id for the image saved. Use a button control to upload the image to the database. Namespaces like System.Data.SqlClient, System.Drawing, System.Data, System.IO, and System.Drawing.Imaging are used in this task. In the OnClick property of the button you can write the following code to upload an image to the database.// create a byte[] for the image file that is uploadedint imagelen = Upload.PostedFile.ContentLength;byte[] picbyte = new byte[imagelen];Upload.PostedFile.InputStream.Read (picbyte, 0, imagelen);// Insert the image and image id into the databaseSqlConnection conn = new SqlConnection (@"give the connection string here...");
قسمتی از محتوی متن پروژه میباشد که به صورت نمونه ، بعد از پرداخت آنلاین در فروشگاه فایل آنی فایل را دانلود نمایید .
« پرداخت آنلاین و دانلود در قسمت پایین »
![]()
ریاضیات در بسیاری از زمینهها مثل علوم طبیعی، مهندسی، پزشکی، اقتصاد و علوم اجتماعی یک علم ضروری است. با گذشت زمان، شاخههای کاملاً جدیدی در ریاضیات بهوجود آمدهاند؛ مثل نظریه بازیها. ریاضیدانان در ریاضیات محض (مطالعه ریاضی با هدف کشف هرچه بیشتر رازهای خود آن) بدون اینکه ... ...