Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   Saving binary data in MySQL (http://www.velocityreviews.com/forums/t799960-saving-binary-data-in-mysql.html)

Sune 11-04-2005 06:25 PM

Saving binary data in MySQL
 
Hi,

Does anyone know a website with a guide on how to upload binary data to a
MySQL database using ASP? I have a script that i spent a lot of hours on
getting to work, but after i upgraded my MySQL server it doesn't work anymore
:(

I'm just getting an error from the odbc driver (upgraded from 2.5X odbc driver
to 3.51X):

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Invalid string or buffer length

I'm trying to do the upload via AspSmartUpload, with a script that opens
the record and uses .AddNew to the recordset.
Anyone who knows a guide, a solution os possibly someone who can help me?
Thanks!
--
Regards,
Sune



Steven Burn 11-05-2005 01:51 AM

Re: Saving binary data in MySQL
 
Don't use SQL myself but, a few points;

1. Don't use ODBC.... I believe it's been deprecated

http://aspfaq.com/show.asp?id=2126

2. Store the binary files on the server, and not in the database.

http://aspfaq.com/show.asp?id=2149

3. Use INSERT and not .AddNew

http://aspfaq.com/show.asp?id=2191

For the specific error you mentioned, see if anything here helps ...

http://www.aspfaq.com/show.asp?id=2289

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

"Sune" <dsl102647@vip.cybercity.NOSPAMdk> wrote in message
news:4183479632667290940468750@dreader.cybercity.d k...
> Hi,
>
> Does anyone know a website with a guide on how to upload binary data to a
> MySQL database using ASP? I have a script that i spent a lot of hours on
> getting to work, but after i upgraded my MySQL server it doesn't work

anymore
> :(
>
> I'm just getting an error from the odbc driver (upgraded from 2.5X odbc

driver
> to 3.51X):
>
> Microsoft OLE DB Provider for ODBC Drivers error '80004005'
> [Microsoft][ODBC Driver Manager] Invalid string or buffer length
>
> I'm trying to do the upload via AspSmartUpload, with a script that opens
> the record and uses .AddNew to the recordset.
> Anyone who knows a guide, a solution os possibly someone who can help me?
> Thanks!
> --
> Regards,
> Sune
>
>




Sune 11-05-2005 10:28 AM

Re: Saving binary data in MySQL
 
Thanks for your suggestions and links!
I got it working by adding "con.CursorLocation = 3"

> 2. Store the binary files on the server, and not in the database.

I need them in the database.

> 3. Use INSERT and not .AddNew

Can't get AspSmartUpload to work with an insert statement.
--
Kind regards,
Sune




All times are GMT. The time now is 11:05 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.