[WebMethod]
public byte[] GetImageInfo()
{
string cnnstr = "Data Source=JOHN;Initial Catalog=webservice;User ID=sa;Password=12345678";
string sql = "select * from imagetable";
SqlConnection conn = new SqlConnection(cnnstr);
conn.Open();
SqlCommand comm = new SqlCommand();
comm.Connection = conn;
comm.CommandType = CommandType.Text;
comm.CommandText = sql;
SqlDataReader dr = comm.ExecuteReader();
byte[] bytes=null;
while(dr.Read()){
bytes = (byte[])dr["imageLabel"];
}
return bytes;
}