Question: I have to store the value inside the `image` variable. Image is Object. It is store a string value format from database for `D:/Server/data/uploadedfile/12874c9be4308ddfdee9c10e5ffea507.png`. I need change to `D:\Server\data\uploadedfile\12874c9be4308ddfdee9c10e5ffea507.png`. But I was always trying all option of `strurl.replace('/','\\');` and any other alternative option or not?

```
PatientImage image = patientServiceImage.getImageUrl(imageId, imageuri);
System.out.println("imageuri is" + image);
String strurl=image.getImageurl();

String str =strurl.replace('/','\\');
System.out.println("Image Url Checking"+str);

```

Answer: 
replace this 

```
List<NameValuePair> elements = new ArrayList<NameValuePair>(1);

```

with

```
List<NameValuePair> elements = new ArrayList<NameValuePair>();

```

after this you can insert 'n' number of string in list.
First you need to check length defined for fields in database engine. Secondly as you are posting data to URL it supports much lengthy data. There would be some special character in your input which will be making problem.

Also provide server side code and if not possible share input you given and one stored in DB.

For debugging purpose you can run query directly on DB and check if the input you are trying to save is inserted or not.

Hope this helps.