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

Posted on 2003-02-27
Medium Priority
Last Modified: 2010-04-04
 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.

Question by:faustomen
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 8045783
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! :)

Author Comment

ID: 8071463
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.



Accepted Solution

loop_until earned 800 total points
ID: 8071544
I'm about to go out for today so you'll have to wait this evening for the threaded sources but you'll need a component that can work in thread and your web server will need to have the script/cgi timeout greater than what it takes to upload your biggest image if you want this. Normally, if you have those two things you will be able to send your pictures your way.

See you later! :-)

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.


Author Comment

ID: 8073270
Ok. The pictures are small (maximum 200Kb).
I'll wait for your codes.


Expert Comment

ID: 9317035
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 
Post your closing recommendations!  No comment means you don't care.
LVL 10

Expert Comment

ID: 9981797
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.


Merry Christmas and happy new year!

EE Cleanup Volunteer

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month12 days, 14 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question