Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 6th, 2003, 07:41 AM
Registered User
 
Join Date: Oct 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default what the Blob is this ?

I'm accessing a SQLserver dbase with (classic) ASP as scripting language. I have to retrieve BLOB records and extract the Html data contained in them as optional parts of the ASP web page.

I've never used BLOB records before, so I'd appreciate any advice on how to use them.

My spec. also says that each BLOB record could contain a complete web page in Html, so any help to extract the html would be great. I suppose I'd have to strip off the <html> to <body> and </body> </html> tags as the parent page already has them ??

Thanks for any help
 
Old October 7th, 2003, 05:01 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 256
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Alright, this is an unhelpful question, but my sense of moral outrage at seeing a database so used compels me to ask: why are the files stored in the database as BLOBs, when their paths could have been stored as text-type felds? This would be a far simpler solution. If you have already been presented with some crufty old database containing thirteen billion HTML files, all stored as BLOBs, then obviously you will have to make the best fist of it, but if I can intervene in the design process of this database before it's too late, I'd like to....
 
Old October 8th, 2003, 02:34 AM
Registered User
 
Join Date: Oct 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The design is a done deal I'm afraid.
The dbase is a proprietary Customer Relationship Management s/ware to which we are adding extra data. The extra sections are presented to the customer (within the CRM) as a MS Word document which they can update themselves (without knowledge of Html). The Word doc is then stored as Html in the Blob record. I have then to present this Html/Blob data on the corresponding website WITIHN an existing web page. There's approx. 50 web pages with 6 optional extra sections. It's not very pretty but I'm stuck with it.
Thanks for the comment anyway
 
Old October 10th, 2003, 04:15 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

When you say BLOBs you're talking about (N)Text datatype, not image, right? And you only need to read them, not insert/update them? If this is the case just treat them as you would a char or varchar, for example SELECT theBLOB FROM TableName WHERE whatever, and strVariable = rsName.Fields("theBLOB").Value will work just fine.

there are methods like GetChunk available which you can use to get bits of the field at a time, but in my experience you don't need these unless the amount of data in the BLOB is very big (I've seen it suggested that "very big" means over 2GB, personally I've only had to deal with Text <= 200K and I've never needed GetChunk).

hth
Phil





Similar Threads
Thread Thread Starter Forum Replies Last Post
BLOB: file is empty after retrieving blob data thr taraprasad Pro JSP 0 May 22nd, 2008 10:02 AM
Blob Komila Classic ASP Professional 2 March 23rd, 2007 10:11 AM
BLOB kale_harish Pro JSP 0 February 14th, 2007 01:32 AM
BLOB from jsp upen Java Databases 0 October 30th, 2006 09:35 AM
Analyze of a Blob yanis97 Java Databases 0 September 16th, 2006 12:04 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.