How to insert and retrieve image in MSSQL by using java?
-
I am trying to make a simple application by using java and MSSQL but i don't know how to insert the image in SQL by using java. I search on the net but I didn't succeed. I am stack by this on my application and cannot move further. So, Please help me on this.
-
Answer:
dont store the image in the db, but just store the link (example: C:\Image\someImage.png) just read the link when u need it and display image from there hope this helps you
anamol at Yahoo! Answers Visit the source
Other answers
It's better not to store images or other large BLOBs in the dartabase itself if you can help it for 3 reasons: 1) it wastes tablespace 2) the bloated rowsize slows down queries 3) you can't do any sort of searching against it in a WHERE Instead, create a folder somewhere and store the binary data there while just storing the path to it in the database. Then after retrieving the path, getting the image itself is a trivial second step.
TheMadProfessor
Related Q & A:
- How to upload file to google cloud storage using Java?Best solution by Stack Overflow
- How to insert data in db using jsp?Best solution by Yahoo! Answers
- How to Implement Gateway Service something similar to Oracle API gateway Using Java and Java based Open Source frameworks only?Best solution by Quora
- How to save high resolution image canvas to server using asp.net?Best solution by Stack Overflow
- how can I listen for database changes using java?Best solution by Stack Overflow
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.