Posted on: 1/19/2012 9:56:16 PM | Views : 223

Hi all,
How do I save query results as a jpeg file?  I'm querying both the email and image fields and need to save the file as <email address>.jpg.
Is this possible?
I'm using some old code involving a database in which I saved query data to an xml file.  Now I just need to do the same with jpeg.
SqlConnection con = new SqlConnection("server=###;database=###;Initial Catalog=###;uid=###;pwd=###"); SqlCommand query = new SqlCommand("SELECT a.email, b.image01 from empmast a, picture where a.perno = b.perno"); query.Connection = con; SqlDataAdapter mysqldataadapter = new SqlDataAdapter(); mysqldataadapter.SelectCommand = query; DataSet mydataset = new DataSet(); con.Open(); mysqldataadapter.Fill(mydataset, "email"); DataTable mydataTable = mydataset.Tables["email"]; //CODE FOR THE DAILY PROCESS ...

Go to the complete details ...