Using SQL Server to provide images for a Web browser _php tutorial

Source: Internet
Author: User
The Microsoft SQL Server database server can save images and large amounts of text in a SQL database. The data types used for pictures and text are image image types and text text types, respectively. If using VB or VC to develop front-end applications, running on the Windows operating system, it is easy to extract the image data from the SQL database, put it into a file, and displayed on the screen. However, if you want to get pictures from SQL Server and display them in a Web browser, it's not that easy. While Microsoft SQL Server 6.5 provides Web assistants and stored procedures sp_makewebtask, sp_runwebtask, which can convert data from SQL databases into HTML files, we have a better solution. One problem with using the Web Assistant is that it does not accept fields of the picture data type. On the other hand, the stored procedure sp_makewebtask too many parameters, is difficult to use, and it is difficult to customize the Web page.
 
Here we provide a solution to load images from SQL data to a Web browser, which is better than sp_makewebtask. We developed a Web project with an ActiveX dynamic link library and an ASP page. The dynamic link Library is responsible for opening the connection to the SQL database where the pictures are saved, extracting the pictures from the database and storing them in a temporary file. ASP and the dynamic link library to communicate, get the temporary picture file location. This way, when a visitor clicks on a Web site, the image is downloaded to his browser. In this article, we describe the steps to set up a SQL database. We will then show you how to build an ActiveX dynamic link library using VB5 and the active data object ADO 1.5. Finally, we also discuss the process of building ASP Web projects, connecting to SQL databases, and writing ASP files.
 

http://www.bkjia.com/PHPjc/631219.html www.bkjia.com true http://www.bkjia.com/PHPjc/631219.html techarticle the Microsoft SQL Server database server can save images and large amounts of text in a SQL database. The data types used for pictures and text are image image types and text text types, respectively. If you make a.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.