WCF服务库使用照片 [英] WCF Service library using photo
本文介绍了WCF服务库使用照片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,我有一个wcf服务库,该库连接到db Oracle并从客户端拍照.如何通过wcf服务从客户端保存照片?
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?
推荐答案
这是我的代码示例
This is example of my code
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;
}
这篇关于WCF服务库使用照片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文