打印本文 打印本文 关闭窗口 关闭窗口
Store Images in Your Database
作者:武汉SEO闵涛  文章来源:敏韬网  点击数2028  更新时间:2009/4/23 16:39:56  文章录入:mintao  责任编辑:mintao
obably the only situation in which saving the image to the database as a binary object could be recommended. The tradeoffs in speed and database size aren''''t worth it unless you anticipate that changing file locations will hinder your application.

Finally, you might be wondering if you can use these methods to store images in a SQL Server database. Although the Ap-pendChunk and GetChunk methods also work for SQL Server databases, Microsoft discourages this approach because BLOB columns in SQL tables cause performance degradation at your server. Microsoft''''s recommended method for using SQL tables is to store a pointer to the file location.

Getting all your application''''s images stored in a database might take some time at first, but the rewards will be apparent quickly. You can now design a quick data entry form to update your Web site''''s images. You no longer need to recompile when you want to change your application''''s graphics. Try using an image database in your next project, and see the difference it can make in flexibility and portability for your users.

Andy Rosebrock is the owner of Axe Inc. (www.axeinc.com), a Sarasota, Fla.-based contract programming and Web development company that works with VB and other development platforms. Reach Andy at andyr@axeinc.com.

Stan Schultes is a project manager and VB and Web enterprise application developer in Sarasota, Fla. Stan is an MCP in VB and spoke on VB development at Microsoft''''s DevDays conference. He is a contributing editor for VBPJ and writes regularly for the magazine. Reach Stan at Stan@VBExpert.com.

上一页  [1] [2] 

打印本文 打印本文 关闭窗口 关闭窗口