473,320 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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
Nov 4 '05 #1
2 4113
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" <ds*******@vip.cybercity.NOSPAMdk> wrote in message
news:41***********************@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

Nov 5 '05 #2
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
Nov 5 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: G-Factor | last post by:
Hi all I've just started learning about saving files. I got bit of a problem. The following code gives me an error about incompatible types. (Cannot covert from class character to char *). I...
0
by: David List | last post by:
I am wondering what I miss to be able to handle binary data from the mysql client. I have ensured that the user has file_priv set to 'Y' and that max_allowed_packet is larger that the binary lumps...
4
by: Jerivix Entadi | last post by:
I'm attempting to create an application to work with a fluid database of people. I'm doing this in a command line, text-based manner. I need to know two things: 1) How do I save data, perhaps a...
10
by: Krakatioison | last post by:
Hi everyone, can someone point me to download of an example for saving and retrieving to/from MYSQL database. Or did anyone of you tried this and could share your code with me. I've got some data...
7
by: Gav | last post by:
If you had a class user with variables id, name, password. How would you save this object or its variable date to a MySQL database? And then if you had a dbase populated with id, name, password and...
8
by: Mark | last post by:
Hello. I am attempting to write binary data from a file to an OLE Object field, and then write the file back out from the database. I am reading and writing the files in binary mode, and using...
4
by: Pedro Leite | last post by:
Good Afternoon. the code below is properly retreiving binary data from a database and saving it. but instead of saving at client machine is saving at the server machine. what is wrong with my...
3
by: Me Alone | last post by:
Hello: I am trying to edit some C code I found in "The definitive guide to using, programming, and administering MySQL" by Paul DuBois. This C client program connects and then segfaults when...
3
by: ist | last post by:
Hi, I am trying to get (and transfer over ASP.NET) some encrypted data from some MySQL fields. Since the data contains many unicode characters, I tried to get the data as a series of ASCII...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.