Ever used a DBWebImage together with Microsoft SQL, and Borland Data Providers? If you do, you may run right into a slight problem.

The problem is that DBWebImage seems to display only portions of the image, either dark, or blank. The issue is that Borland set the default ConnectionOptions with a blobsize of 1024. Of course, I didn't know it at that time. I tried linking DBWebImage to a DBWebDataSource and a DataSet, but no matter what, my image wouldn't display.

Then, I thought perhaps my images were corrupted. So, I wrote a separate program and loaded them into the database. Again, same result. My images weren't displayed properly. Then, I use ODBC Explorer to query the database, and the images came out correctly. This lead me to suspect that the implementation of DBWebImage is at fault, so I looked into the source codes, but couldn't find any fault in DBWebImage.cs.

Then, I set the DBWebImage property UseCacheFile to True, and tried again. Still the same problem. So, I opened up an editor, and looked at the generated image file. It appeared to me that the first 0x400 bytes were filled. Converting 0x400 in my head led me to 1024 in decimal. So I started searching, and found 1024 in ConnectionOptions. Thinking that might be it, I ramped up the 1024 to 50000, like so.

BdpConnection1.ConnectionOptions := 'transaction isolation=Read Committed; blobsize=50000';

That did the trick. After fixing it, the following is what the design time experience for the page looked like. It's actually an implementation of Borland's Fish Facts demo, using ASP.NET.



I've implemented the above at my business site at Right Security Consultants