Click here to Skip to main content
15,891,936 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I am trying to retrive data from my tables. As a parameter i have to pass image values as a byte array.
Here is my Code:
C#
byte[] Images = sqlUniqueidentifierListNull().GetListAndReset();
SqlConnection conn = new SqlConnection(ConfigurationSettings.AppSettings["connectionString"]);
conn.Open();
SqlCommand cmd = new SqlCommand("GetData",conn);
cmd.CommandType = System.Data.CommandType.StoredProcedure;

cmd.Parameters.Add(new SqlParameter("@statusGUIDs", System.Data.SqlDbType.Image,Images.Length));
cmd.Parameters["@statusGUIDs"].Value = (object)(Images);

When i rum my WPF Application it quits without even giving an error message.The error message is vshost.exe has stopped working. Check online for a solution,debug etc.
Posted
Updated 3-Jun-10 9:04am
v3

1 solution

What exactly are you trying to do here? One side you say you are trying to retrive image from database, and on the other hand you are using image byte array as parameter to use a stored procedure!

Thus, your question looks meaningless.
Further, Why would one need to pass an image byte array as a parameter? What kind of design it is!
 
Share this answer
 

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