This is quite easy.  SciBit developed an ASP COM Object called MySQLX 
(http://www.scibit.com/MySQLX) which does exactly what you want, this component is 
almost two years old now and is very stable and used world-wide in many 
applications/webs including real-time apps.

The help is a bit sparse, but ALL the samples including submitting and displaying BLOB 
images in ASP from MySQL is in ASP/VBScript and available in the install directory.  
This component also includes functions for:
* Escaping and Hexing data ready for a sql statement
* Utility functions like FormatDateTime, etc.
* SMTP an email with or without attachments :)
* Easily create and convert mysql tables to webtables with 1 ASP call.
* Generate PDF,XLS,RTF reports designed with Mascon (http://www.scibit.com/Mascon) 
live to the browsing client and you can even attach this report as PDF to an email and 
sent it in the same move, without using any files (samples included, no batteries 
though;)
* etc, etc, etc.  really too many to mention

To answer more questions:  You should really use the hex method (see MySQL Docs) for 
submitting BLOB/TEXT data to MySQL in any client app this solves a lot of headaches 
for escaping and converting data.  Your MySQL has a variable called max_packet_size 
which defaults to 1Mb (maximum size of a single sql statement) though and you should 
set this to its maximum of 16Mb.  Because of the Hex data each byte becomes two 
characters in the sql statement so you would then effectively be limited to 8Mb 
images, which in most cases should be fine for most webbased JPG, etc.  NOTE: If you 
don't set this variable you will be limited to only 500Kb images and you will get a 
MySQL client error "MySQL server has gone away!" (seriously;-) if you try to go larger.

Live samples of MySQLX can also be interactively viewed and used at the website: 
http://www.scibit.com/MySQLX. BTW the report samples is REALLY live and generated to 
PDF from a live MySQL server when you click them and not links to PDF files.  Although 
this is a commercial product it is rather cheap at $89 if you consider you get a 
direct mysql data accessing/editing component (no ODBC, just you & MySQL and the open 
road), email component, live PDF report generating, mysql table to webtable 
converting, mysql table to formtable converting components all in one.

To see a real world application look at a sample of what SciBit developed for an Anglo 
American company called Anglo Platinum: http://www.scibit.com/sepix  everything you 
see in this webbased app sample is from a sample MySQL database and accessed only with 
MySQLX.  From the tables, PDF reports to the images (in BLOBs and in files on the web 
server)

Seeing that I wasted all this time and space and you are still reading, you are 
interested in what you're reading. So I can just as well mention that this email was 
sent with MyLook (http://www.scibit.com/MyLook) which is a groupware mysqlbased 
outlook type application written in Delphi/Kylix using our components 
(http://www.scibit.com/MySQLComponents).

Kind Regards
SciBit MySQL Team

> -----Original Message-----
> From: "Zill-e-Hassan" <[EMAIL PROTECTED]>
> To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> CC: 
> Subject: Blobs+ASP+MySQL
> Sent: Thu, 25 Apr 2002 20:02:19 GMT
> Received: Thu, 25 Apr 2002 19:56:05 GMT
> Dear All
> 
> I have been trying to find out if there is a way of actually storing
> pictures as Blobs in MySql . Eventually i want to upload and download
> pictures to/from the database through the use of ASP. I would also welcome
> any suggestions that you guys may have regarding how to upload the image
> file from my ASP page. I do not want to store the reference. I want to store
> the whole picture.
> 
> In addition to that , i would also like to find out if I can store blobs in
> the database through SQL command. Any Ideas ???
> 
> Insert ......


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to