Click here to Skip to main content
15,741,688 members
Please Sign up or sign in to vote.
0.00/5 (No votes)

I want to pass the byte array into insert query but I am not using the parameter. I am directly passing values into insert query.
I am getting the following error:
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)

The request failed with HTTP status 400: Bad Request.

my code
object str;
System.Text.UTF8Encoding enc = new System.Text.UTF8Encoding();
str = enc.GetString(image);

objGL.GetSelectByQuery("update empmast set photo=convert(varbinary(MAX),'" + str + "') where srno='" + txtSRNO.Text + "'");

Any help is greatly appreciated.
Updated 18-Mar-22 15:48pm
Slacker007 18-May-11 6:30am    
Edited for spelling, grammar, and readability.
Keith Barrow 18-May-11 11:08am    
Can you get the request you client makes to the server you can download and use Fiddler to do this.

1 solution

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