How to store images along with text in the database ------its urgent
i'm developing an application which will be similar to to the page which we use for posting the forum. if in a text field we enter some text and an image how does we store the whole the information in database which in the textarea (both the text entered and the image) and how it can be extracted as if the user entered
Hi,
Refer thsi link, this may help you
http://www.sap-basis-abap.com/saphr003.htm
Call the FM BDS_BUSINESSDOCUMENT_CREATEF to upload the images from System.
codeLOGICAL_SYSTEM
CLASSNAME PICTURES
CLASSTYPE OT
CLIENT 321
OBJECT_KEY ZIMAGE [/code]
and the table parameter Files pass
code DOC_COUNT 00000001
COMP_COUNT 00000001
COMP_ID
DIRECTORY C:\
FILENAME WINTER.JPG
MIMETYPE
[/code]
now check it.
here you can upload multiple images inside a loop call the FM.
Regards,
Shiva.
Similar Messages
-
How to store images in BLOB field in MySql database using java
Hi....
Currently am able to store character string into BLOB using byte array....in MySql.
but i cannot store images or pictures.......
to do this.........please help me out...............
Thanx..........:)Bye...........Hello,
I have done this for Oracle but it should be similar in MySQL also. Try reading thru these links below. Mail us if you have succeeded or not.
http://forum.java.sun.com/thread.jspa?forumID=48&threadID=654086
http://forum.java.sun.com/thread.jspa?forumID=48&threadID=384768
http://forum.java.sun.com/thread.jspa?forumID=48&threadID=549705
Thanks and regards,
Pazhanikanthan. P -
How to transfer control along with Data to the another page (Out of JVM)
Hi,
Please bear with me, incase this turns out to be a dumb question.
I want to transfer control to a non JSP page after I hit submit. Apart from
this I am also sending some data as a HTTPS POST. In case of using
response.sendRedirect(), it doesn't take care of the POST data.
So, can anybody help me with what's the best practice in sending POST
request from a Struts (1.3.8) based J2EE application to another page (which is not a J2EE Application)
Thank youHi,
you should run two different import comand.
The first import with only metadata, just to recreate the structure.
With the second import you will import data only for the tables you need.
I think this is the simplier solution.
Acr -
How to store a varying length string in the database
Hi,
what is the best way to store a string (which can be infinitely long) in the database?
there's limitation on varchar2...can i use blobs/clobs ??
Thanks in advance for any enlightenment!
nullIs this a JDBC question?
Meta data solutions mean that you will only find problems at runtime that would be obvious at compile time with a non-metadata solution. Code generation makes production of large numbers of these easy.
But if you want metadata then you create a seperate class in a seperate package which holds the constants. The specifics depend on the implementation but you will typically have one class for each 'type' that is supported.
That package is used by both the server and the client code.
You can of course put other common functionality in the package (like a wrappers for the collections themselves, validation of names, etc.) -
How to upload image along with timestamp
Hi all,
I need to upload an image (byte array) and its timestamp to server which has jsp/servlet. But having trouble to transmit both in the same request.
In actionscript, I use URLRequest and URLLoader and upload the image without problem, however, I don't know how to upload the timestamp in the same request. I tried to build a ByteArray to contain both timestamp and the image, but I couldn't convert the Date.getTime() to byte[] correctly. The only function in ByteArray to input 8 bytes is writeDouble, but it doesn't embed the time correctly.
Where is the best way to handle this?
Thanks a lotThanks for the reply.
Can you shed some light how to transfer the file over? I use URLLoader with POST method and set the request data to a bytearray which is the image bitmapdata bit array. How do I send the the file name over? (parse the filename is not a problem)
Thanks,
Rovi -
Displaying images along with data on downloading from excel
Hi All,
I need to show images along with data in the excel sheet when user clicks downld to excel button. Is there possible way to show the images in excel sheet if, kindly help.
Thanks & Regards
Jaspreet KaurHi Vinod
Basically I have a report which needs to be downloaded to excel sheet. For each record there is a particular image in the first column for ex say my colums are img, desc. Now image column contains an image corresponding to each description. If its a file, a folder image is there; if its a document, a page image is there etc. Now i am can display the data of text fields in the following manner ie label =new Label(0,RowCount, wdContext.nodeVn_PortalExcel().getVn_PortalExcelElementAt(i).getVa_Role(), PortalRoleDataFormat);
PortalReportsheet.addCell(label);
but how do i display the image in the excel sheet?
Is it possible to do so, if so please provide assistance.
Thanks & Regards
Jaspreet Kaur -
Displaying Images along with Drill Drown Results
I'm using MS access 2003 as my data base and CF as the web
language. I cannot find a topic in reference to displaying Images
along with Drill down results. My tables in access have a OLE
object included however I am clueless as how i can display the
images with my drill down results. I just cannot find a link that
talked about this issue already. Does anyone have a link to this
forum topic?College Kid wrote:
> I'm using MS access 2003 as my data base and CF as the
web language. I cannot
> find a topic in reference to displaying Images along
with Drill down results.
> My tables in access have a OLE object included however I
am clueless as how i
> can display the images with my drill down results. I
just cannot find a link
> that talked about this issue already. Does anyone have a
link to this forum
> topic?
>
Sorry, no link, but I think you want to be looking at the
<cfimage...>
and|or the <cfcontent...> tags. One or both of these
tags should allow
you to deliver the image from the database to the client.
You are doing this in a bit of an unusual, but not unheard of
way. Most
people just store the image file in a handy directory
accessible to the
web server and then store the name|URL to this image as text
in the
database.
But it is definitly possible to server up binary image data
as well.
Though I have never heard of this in conjunction with MS
Access and 'OLE
objects'. I usually hear this discussed in relation to more
enterprise
database management systems and BLOB [Binary Large OBjects]
data fields. -
please tell me how to store images in access
The JDBC-ODBC Bridge?
Or, better yet, a Google (or whatever engine) search for a real JDBC Driver for access (I do believe at least one exists).
The JDBC tutorials and, maybe, a little Google (or whatever engine) searching for examples, should provide more than enough to get started.
Once you have something, and it still has a problem, post it, along with a complete, and concise, description of the problem, along with all error messages, and we will help you further. -
How to embed images in long text of PM Notifications/Orders
Dear Sir,
How to embed images in long text of PM Notifications/Orders? Kindly help.
Thanks & Regards
PM Team.Hi,
Unfortunately, You will not be able to view the graphics within the Long text editor screen.Only Limited word functionality is available on these editors.
You will have to store these pictures separately as an attachment, through generic object services and then view them through that.
Regards
Narasimhan -
How to store images in database and retrieve them back to page?
Well I don't know how to store an image file to a database (say MSSQL) from the JSP and retrieve it back whenever needed and put it on the JSP page? Please help me.
I am not sure how to store images in database but what you can do is store the image into particular folder using FileOutputStream and its unique name into the database...and than retrieve it from the folder using that name retrieved from database...
<%
response.setContentType("text/html");
response.setHeader("Cache-control","no-cache");
String err = "";
String lastFileName = "";
String contentType = request.getContentType();
String boundary = "";
final int BOUNDARY_WORD_SIZE = "boundary=".length();
System.out.println("contentType --> "+contentType);
System.out.println("BOUNDARY_WORD_SIZE --> "+BOUNDARY_WORD_SIZE);
if(contentType == null || !contentType.startsWith("multipart/form-data"))
err = "Ilegal ENCTYPE : must be multipart/form-data\n";
err += "ENCTYPE set = " + contentType;
else
boundary = contentType.substring(contentType.indexOf("boundary=") + BOUNDARY_WORD_SIZE);
System.out.println("boundary --> "+boundary);
boundary = "--" + boundary;
try
ServletInputStream sis = request.getInputStream();
byte[] b = new byte[1024];
int x=0;
int state=0;
String name=null,fileName=null,contentType2=null;
java.io.FileOutputStream buffer = null;
while((x=sis.readLine(b,0,1024))>-1)
System.out.println("************ x ********** "+x);
String s = new String(b,0,x);
System.out.println("************ s ********** \n"+s);
if(s.startsWith(boundary))
state = 0;
System.out.println("name="+name);
System.out.println("filename="+fileName);
name = null;
contentType2 = null;
fileName = null;
else if(s.startsWith("Content-Disposition") && state==0)
System.out.println("-- 1 --");
state = 1;
System.out.println("s.indexOf(filename=) --> "+s.indexOf("filename="));
if(s.indexOf("filename=") == -1)
name = s.substring(s.indexOf("name=") + "name=".length(),s.length()-2);
System.out.println("after name substring 1 "+name);
else
name = s.substring(s.indexOf("name=") + "name=".length(),s.lastIndexOf(";"));
System.out.println("after name substring 2 "+name);
fileName = s.substring(s.indexOf("filename=") + "filename=".length(),s.length()-2);
System.out.println("fileName --> "+fileName);
//String fileName1 = s.substring(s.indexOf("filename=") + "filename=".length(),s.length());
//System.out.println("fileName1 -->"+fileName1);
if(fileName.equals("\"\""))
fileName = null;
else
String userAgent = request.getHeader("User-Agent");
System.out.println("userAgent --> "+userAgent);
String userSeparator="/"; // default
if (userAgent.indexOf("Windows")!=-1)
System.out.println("test --> "+"\\");
userSeparator="\\";
if (userAgent.indexOf("Linux")!=-1)
userSeparator="/";
System.out.println("userSeparator "+userSeparator);
System.out.println("fileName before inserting userSeparators "+fileName);
fileName = fileName.substring(fileName.lastIndexOf(userSeparator)+1,fileName.length()-1);
System.out.println("fileName after userSeparators "+fileName);
if(fileName.startsWith( "\""))
fileName = fileName.substring( 1);
name = name.substring(1,name.length()-1);
System.out.println("name 2 --> "+name);
System.out.println("final file name "+fileName);
if (name.equals("file"))
if (buffer!=null)
buffer.close();
lastFileName = fileName;
buffer = new java.io.FileOutputStream("/Documents and Settings/sunil/Desktop/images/"+fileName);
else if(s.startsWith("Content-Type") && state==1)
System.out.println("-- 2 --");
state = 2;
contentType2 = s.substring(s.indexOf(":")+2,s.length()-2);
System.out.println("contentType2 --> "+contentType2);
else if(s.equals("\r\n") && state != 3)
System.out.println("-- 3 --");
state = 3;
else
System.out.println("-- 4 --");
if (name.equals("file"))
System.out.println("Final x :: "+x);
buffer.write(b,0,x);
} // while closing
sis.close();
buffer.close();
}catch(java.io.IOException e)
err = e.toString();
boolean ok = err.equals("");
if(!ok)
out.println(err);
else
%>
<SCRIPT language="javascript">
history.back(1);
alert('Uploaded <%=lastFileName%>');
window.location.reload(false);
</SCRIPT>
<%
out.println("done");
%>
</BODY>
</HTML>
I think it will solve ur problem.. -
How to store image files in oracle DB
Hi,
I am new to working with database.
Please let me know how to store image files in Database using insert command.
Thanks,
Ramesh Yakkala.Hi,
You need to create a directory object to import these files:
Take a look on the example below:
eg:
CREATE TABLE MY_IMAGE_TABLE (
ID NUMBER,
NAME VARCHAR2(20),
IMAGE BLOB);
CREATE OR REPLACE DIRECTORY IMAGES AS '/tmp';
GRANT READ, WRITE ON DIRECTORY IMAGES TO PUBLIC;
CREATE OR REPLACE PROCEDURE load_file_to_my_table (p_file_name IN MY_IMAGE_TABLE.NAME%TYPE) AS
v_bfile BFILE;
v_blob BLOB;
BEGIN
INSERT INTO MY_IMAGE_TABLE (id, name, image)
VALUES (1, p_file_name, empty_blob())
RETURN doc INTO v_blob;
v_bfile := BFILENAME('IMAGES', p_file_name);
Dbms_Lob.Fileopen(v_bfile, Dbms_Lob.File_Readonly);
Dbms_Lob.Loadfromfile(v_blob, v_bfile, Dbms_Lob.Getlength(v_bfile));
Dbms_Lob.Fileclose(v_bfile);
COMMIT;
END;
SQL> execute load_file_to_my_table('myfhoto.jpg');Cheers -
How to get spool along with e-mail or FAX
Hi,
I have a requirement where i have to produce a spool even i go for e-mail or FAX option when the script is triggered.
I am using a standard program where it is coded to have either of the option. i.e. either we have to go for a printer or e-mail or FAX.
Could any one suggest me how to get spool along with e-mail or FAX option.
Thanks in advance.Hi,
check this:-[http://help.sap.com/saphelp_nw04/helpdata/en/a5/28d3b9d26211d4b646006094192fe3/frameset.htm]
hope u'll get some idea.
Regards,
Sneha. -
How to store image in the oracle database 10.2. using File Maker 10.
Hi.,
I want to store image, media file in the oracle database using File Maker as a front end.
I connect Oracle using odbc from file maker. There are table and in that table there a column "pict" of blob type. but this column is not showing in the file maker.
2. Here I can not change the data type of any column.
Now how to store images in the oracle table using odbc or any other tool.
Regards,
ShyamI wrote an example for my students, you can find it here. It's using PHP as the front end but all you need to do is know how and leverage the stored procedures. All code is downloadable in zip files from the blog.
http://blog.mclaughlinsoftware.com/php-programming/oracle-lob-processing/ -
hi,
can u pls tell how to store images in MAXDB using java.......
regards
Guruhttps://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f5d3c40a-0801-0010-55b7-9e3b01745a40
-
How to store images in database using java
hii
how to store images in database using java..........
Message was edited by:
naveennagaI asked a similar question once and the answer I got was - Don't.
Instead, store the images on a drive somewhere and store the path in the database.
But I'm no expert - that's just what I was told by someone who does this kind of stuff a lot.
Hope that helps.
Maybe you are looking for
-
My brushes will not work normal
My brushes stopped working like they normally worked. I have XP and CS5 my brushes went from being a cirale that I could change to just a little dot that wouls not change I could see the numbers change but the brush itself would not. I came to the fo
-
ABAP code to set Infopackage Monitor to "RED" status?
Hello, I have an Infopackage that is using ABAP code to determine the selection values dynamically for an Infoobject during the load (Type: 6 ABAP routine). We have built in customer error checking on the selection values based on our requirements.
-
Samsung CLP-300 attached to Airport Express Base Station: Issues
I have found that my Samsung CLP-300 printer, which is connected to my Airport Express Base Station via USB, refuses to print after printing one document. After restarting my Airport Express Base Station, I found that the printer would start printing
-
HT1045 Where can I get the software to be reinstalled?
I'm looking for the Jam Packs of GB. Where can I download them?
-
Illustrator CC 2014 error code U44M1P7
Hi, Illustrator CC 2014 will not open and the update gives me an error code U44M1P7 Please help Mike