CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Upload to MsSQL

Print topic Send  topic

Author Message
cruisin

Posts: 31
Posted: 10/18/2008, 8:32 AM

I'm used to using the regular file upload and storing the path in the DB. But I have a user which insists on the images being stored in the DB. I could use some details on doing that.

Rob
View profile  Send private message
Oper


Posts: 1195
Posted: 10/18/2008, 6:40 PM

since you already know the trick to upload simple file:

upload all file always with the same name then after file uploaded insert into MYSQL

UPDATE table SET blob_data=LOAD_FILE('/tmp/picture'); (file must be in server)

you must have the FILE privilege assigned
The file size must be less than max_allowed_packet bytes. (in you ini)





_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)

http://www.PremiumWebTemplate.com
Affiliation Web Site Templates

Please do backup first
View profile  Send private message
cruisin

Posts: 31
Posted: 10/19/2008, 4:13 AM

thanks for the suggestion but you've hit on my problem. The client doesn't want to allow file access to the box the web server is on. The DB is on a separate machine.
View profile  Send private message
Oper


Posts: 1195
Posted: 10/19/2008, 6:24 AM

MYSQL Manual:
LOAD_FILE('/tmp/picture') file must be in server.

cruisin the client not always have th reason.

1) One server with file storage on that other server
2) Another Database in another server with the File storage on the Database


have you try read the file into a Variable and insert to MYSQL.



i dont think you have another choices.

_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)

http://www.PremiumWebTemplate.com
Affiliation Web Site Templates

Please do backup first
View profile  Send private message
cruisin

Posts: 31
Posted: 10/19/2008, 6:31 AM

This is actually msSQL (specifically 2005) and not mySQL
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.