Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, I have a wcf service library,which connect to db Oracle and takes photo from client. How I can save photo from client by wcf service?
Posted

1 solution

This is example of my code
C#
public int AddPhoto(Photo photo, string id)
{          int s;            s = 0;            string PhotoIns;
    PhotoIns = "insert into person_picture(persp_id,persp_comment,persp_picture) values("+photo.id+", "+photo.Comment+", "+photo.Image+")";

            OracleConnection oracon = new OracleConnection(con);
            oracon.Open();
            OracleCommand InsPhoto = new OracleCommand(PhotoIns, oracon);
            OracleDataReader oradr = InsPhoto.ExecuteReader();

            oradr.Read();

            if (oradr.RecordsAffected > 0)
                s=Convert.ToInt32(oradr["persp_id"].ToString());
            return s;
        }
 
Share this answer
 
v2
Comments
Wendelius 26-May-12 15:37pm    
OP's comment:
"How you solve this problem?I dont understand"

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900