How to save image in database
hi ,
I am developing a application. i want to upload image with person's details and save it to database. How to do this? I hv got tutorials for uploading image but want to know how to save it to database table along with person's details.
Thanks in advance.
Regards
Rajaram
1.Go to transaction SE78.
2.Select tree menu: Form Graphics -> Stroed on Document Server -> Graphics General Graphics -> BMAP Bitmap Images
3.Select <IMPORT> to import bitmap image file to SAP. System will popup screen for input file information and target name.
4.Select <Tick> After you already input data. System will upload image and return message to tell you success or fail.
5.You can preview the picture that uploaded by select<print prv>
If u want to store the images and retrive it from the server corresponding to the person id then just save the image by person id and code it as per the requirement.
U can save ur images using se78 and also u can c it using TCODE AL11.By navigating thru the exact path u can get the images.
Similar Messages
-
MVC 4 Using Entity Framework How to save Images in Database
Iam Beginner to
MVC 4 ... I want to Upload Image from my form and save to the SQL Database by Using Entity Framework . I have searched alot but couldnt succeed yet,,http://forums.asp.net/
You should post to the MVC section of above forum first. -
How to save image catch from USB camera to database ?
Hi guys.
I needed help on IMAQdx tools. But i dont know how to save image that catch from USB camera to database.So you can acquire the image OK?
And you want to save it to a SQL database?
See here:
http://zone.ni.com/devzone/cda/epd/p/id/5210 -
How to save image files into SQL Server?
Hello, All:
Does anyone know how to save image files into SQL Server? Does the file type have to be changed first?? Please help me! Thank you!You need a BLOB field (usually)... Then you can check this tutorial out:
http://java.sun.com/developer/onlineTraining/Database/JDBC20Intro/exercises/BLOBPut/
There are other exercises on that site, including one on reading the images back. -
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 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. -
E61i -- HOW TO SAVE IMAGES FROM WEBSITE WHILE BROW...
ANYBODY KNOWS HOW TO SAVE IMAGES FROM WEBSITE WHILE BROWSING IN E61i ???
ABDULLAH SHAHID SHEIKH
IMANGROUP, IMAN ROAD, NOORPUR, ALI BLOCK, MUSLIM TOWN, FAISALABAD, PAKISTAN.
TEL. 0092418782792-93
CELL. 00923008651424which version should i use ,, i mean suitable for my E61i,,, the opera mini or the opera mobile????
is opera mini can save the images as well???
25-Aug-200702:43 PM
iantaylor27 wrote:
Hi
If you use opera mobile, it aloows saving of images to memory card etc
www.opera.com
ABDULLAH SHAHID SHEIKH
IMANGROUP, IMAN ROAD, NOORPUR, ALI BLOCK, MUSLIM TOWN, FAISALABAD, PAKISTAN.
TEL. 0092418782792-93
CELL. 00923008651424 -
hello, i have been fighting with this for some days, i have a picture that i load with de filerence.load method. and then,
i use the filereference.data to show the picture into the image control.
i need to save the image into database, but i can't. i don't know how i can convert the bytearray into hexa string or binary!!!Hi Sai,
I am getting the error ArgumentError: Error #2015: Invalid
BitmapData. When I am trying to change the image into byteArray using
BitMapData.
Below is the code i am using for this scenario. I am trying to get
byteArray of the image after the image is completely loaded in the
onComplete().
private function initFunction(event:Event):void{
uploadFile =new FileReference();
imgTypes=new FileFilter("images(.JPG,.JPEG,.PNG,.GIF)",*
".JPG;.JPEG,.PNG;.GIF;"*);
private function browseFile():*void
uploadFile.addEventListener(Event.SELECT, onFileSelected);
*try
uploadFile.browse();
catch(err:Error)
logData(err.message);
private function onFileSelected(event:Event):*void
uploadFile.addEventListener(ProgressEvent.PROGRESS, onProgress);
uploadFile.addEventListener(Event.COMPLETE, onComplete);
uploadFile.load();
private function onProgress(event:ProgressEvent):*void
logData("Loaded " + event.bytesLoaded + " of " + event.bytesTotal + *"
bytes."*);
private function onComplete(evt:Event):*void
logData("File was successfully loaded.");
*//image.source = uploadFile.data;
image.source=uploadFile.name;
Alert.show("image source:"+image.source);
var bitmapData:BitmapData = new BitmapData(image.width,image.height);
var ba:ByteArray = png.encode(bitmapData);
Alert.show("bytes loaded"+ba);
Thanks,
Ravi.
On Sat, Nov 20, 2010 at 9:19 PM, ravindharreddy Baddam < -
Save Image to database.
Hi Sir,
I have a painter program which allow drawing activities to take place.
How do I save those painting as image to database like Microsoft SQL Server.
Any suggestions will be appreciated.
Thank you very much.If you want to store your painting in a DB all you have to do is to use JDBC to connect to you DB. By defining a LONG or CLOB field on a table you will be able to store up to 2 Gb. of information inside each field (big enough to store most of images you handle I guess). After that you only have to serialize/deserialize your painting to the DB. I suggest you to review JDBC and Serialization documentation. Is easier than it seems.
Regards. -
How to Save image in a text to my photos
How do I save the photo in a text message to my iPad air photos?
Tap the image in Message. (If you touch too long it brings up the: Copy; Other... menu instead)
This blows the image up to full screen.
Touch the image again to get menu options.
In the top right corner, tap the box with the up arrow. One choice is Save Image. Touch it to save to your camera roll.
In the top left corner, the three-line menu shows you all the photos in the message string, and some metadata like image size and camera title/image number.
This is in IOS 7.1.1 on an iPad, and should work on iPhone and Touch also. -
How to store images in database
Can anyone help me with storing images in database, problem with me is that i m designing a site in which u need to display product information and administrator can add and delete products. now how can i make that administrator can add a image to database, Can u tell me that can image itself can be stored in a database or just the path of it can be stored in a database.
Waiting for quick reply,
thankscan u plss tell me how to store the path of the image in database , do we just have to mention it as varchar field and write the path thats it or do we have to do anything else . and pls also tellme when do we have to set connections ? only at the time to retrieving the images since we are not uploading the image sin DB just mentioning their path . pls reply ASAP
-
How to save image to local machine
how to save my drawing (image or movieclips) to my local sytem without any server side script . i m using player 10. Please share some example
I don't think that will bwe possible
As that will be a hack in terms of an internet user.
However usual solution to this is save your file at server and give user a bitton or some interface to download it -
How to save Image from binding FlipView?
I bind 4 images in my FlipView, how save an binding Image to Picture Library;
<FlipView Name="display1" ItemsSource="{Binding}" Foreground="#FFE6D52E" HorizontalAlignment="Center" VerticalAlignment="Center
<FlipView.ItemTemplate>
<DataTemplate>
<Image x:Name="image" Source="{Binding Path=Image}" Stretch="UniformToFill"/>
</DataTemplate>
</FlipView.ItemTemplate>
</FlipView>
private void SaveImage_Click(object sender, RoutedEventArgs e)
var img = display1.SelectedItem as WriteableBitmap;
StorageFolder appfolder = await KnownFolders.PicturesLibrary.CreateFolderAsync("myimage",
CreationCollisionOption.OpenIfExists);
StorageFile myFile = await appfolder.CreateFolderAsync("imge1.jpg", CreationCollisionOption.ReplaceExisting);
img.Invalidate();
using(Stream strem = await myFile.OpenStreamForWriteAsync())
img.Savejpeg(strem, img.PixelWidth, img.PixelHeight, 0, 100);
//for me it is hard to save binding files,I cant save any imageHi Icce cage,
Per my understanding, you bind the path of image to Image control, so you get image path string from display1.SelectItem property. Try finding Image from this path in installation folder and then copy it to Picture library. Please try the following code
snippet.
Custom class to hold the image object.
public class CustomClass
public string ImagePath { get; set; }
public string ImageName { get; set; }
Initial image sources.
private void Page_Loaded(object sender, RoutedEventArgs e)
images = new System.Collections.ObjectModel.ObservableCollection<CustomClass>();
images.Add(new CustomClass() { ImagePath = "/Images/1.png", ImageName = "1.png" });
images.Add(new CustomClass() { ImagePath = "/Images/2.png", ImageName = "2.png" });
images.Add(new CustomClass() { ImagePath = "/Images/3.png", ImageName = "3.png" });
images.Add(new CustomClass() { ImagePath = "/Images/4.png", ImageName = "4.png" });
images.Add(new CustomClass() { ImagePath = "/Images/5.png", ImageName = "5.png" });
display1.ItemsSource = images;
XAML.
<FlipView RightTapped="display1_RightTapped" Name="display1" Foreground="#FFE6D52E" HorizontalAlignment="Center" VerticalAlignment="Center" >
<FlipView.ItemTemplate>
<DataTemplate>
<Image x:Name="image" Source="{Binding Path=ImagePath}" Stretch="UniformToFill"/>
</DataTemplate>
</FlipView.ItemTemplate>
</FlipView>
Save image to picture library.
private async void display1_RightTapped(object sender, RightTappedRoutedEventArgs e)
CustomClass data = display1.SelectedItem as CustomClass;
if (data!=null)
var installation = Windows.ApplicationModel.Package.Current.InstalledLocation;
var imagesfolder =await installation.GetFolderAsync("Images");
var file = await imagesfolder.GetFileAsync(data.ImageName);
await file.CopyAsync(KnownFolders.PicturesLibrary);
Regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate
the survey. -
How to "Save Image" directly instead of "Save Image As"?
Is there anyway or option to directly save images instead of having to click "save image as" then go into the popup to save the image location? Thank you!
Gingerbread Man made good suggestions.
However you still must "save as" something even if "unnamed001". Windows requires a name and location for each file (whether an image or other file) saved. You can have the same file name in different directories (folders).
You can copy and paste images without saving, in some applications. -
How to save image from email to iPhoto
trying to save image attachment from email to iPhoto
What is the problem? What does not work?
Either drag the attachment from the mail to the iPhoto con in the Dock, or ctrl-click the attachment and use the option "Export to iPhoto" from the pop-up menu (in Mail in MacOS X 10.10). Don't remember, if this worked in Mail in Mac OS X (10.5.8), as your signature is showing.
Maybe you are looking for
-
Unit Test Validation for Output Ref Cursor Not Working
Here is the problem: I have a stored procedure as follows: CREATE OR REPLACE PROCEDURE usp_GetEmployee( p_employeeId IN NUMBER, cv_employee OUT Sys_RefCursor ) AS BEGIN OPEN cv_employee FOR SELECT * FROM employees WHERE employee_id=p_employeeid; END
-
How can I bypass the password on my iPad ios 7.0.3
Can someone please tell me how to bypass the password on my iPad. I don't need it and it's really annoying to have to enter it every single time. Thanks.
-
Installation of CE 7.1 on windows with Max DB
Hi All, I have installed CE 7.1 on windows with Max DB. After successful installtion, it is not getting started. After chekcing the log files, found that that DB connection could not be established. I am not find the Max DB icon in the system tray. I
-
When someone sends me a link in MSN and I try to copy it to the adress bar, it wount happen. Same is with textes in Firefox.
-
Help transferring HDV CLIP 2.28GB to another person for downloading on his
Hi Friends, Got a call last night from a friend asking if he could upload a presentation clip of mine I just put togather on I MOVIE HD from 1080i/30 HD video. The clip is almost 4 minutes long and is about 2.28BG in size. When I tried exporting to Q