Link to home
Start Free TrialLog in
Avatar of faustomen
faustomen

asked on

How can I upload an image from a desktop application to a remote database?

 Hi experts,


  I need to send an image from my client application to a remote database (The database is behind of a firewall).
  Which is the best way ?
  + 200 points to a answer with a source code
  + 400 points to a answer with a source code with thread example.

Thanks
Avatar of loop_until
loop_until

You'll have to provide more information.

 - What database (SQL Server, Oracle, mySQL, ...)?
 - What ports are blocked by your firewall -- or is the database port opened?


Your database being behind a firewall does complexify the problem. Most of the time, direct access to remote database server is not that secure and is restricted by the routers/firewalls. Sending the image to the database is not difficult in most of the cases nor is it to do it in a threaded way. Difficulty is that, if you don't have access to the database, well...

I can make you a threathed sample with source for mySQL quickly if you need so but I'll need more info about your firewall. By the way, you're better not posting the address of your server here if you give info about your firewall.

You should also think about sending the file by FTP and posting the path to the image in your database. Do you absolutely need to post the image directly to the database (this is not necessarily wrong but is it what you want)?


Have a nice day! :)
Avatar of faustomen

ASKER

My database is Firebird.

I have a Web Server connected to a database. When I need to put some data into database, I develop a cgi application. The application receive data from a client application and put this data into database.
Can I use this method to put an image into database?
I known to make this with text data. How can I make with image ? Can you send me an example ?

You can send me your threathed sample with source. I need this because my client application is freezing during the 'upload data' routine.

Thanks




 
ASKER CERTIFIED SOLUTION
Avatar of loop_until
loop_until

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ok. The pictures are small (maximum 200Kb).
I'll wait for your codes.

Thanks
faustomen:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:
       to delete this question and NOT refund points
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Merry Christmas and happy new year!

kacor
EE Cleanup Volunteer