Click here to Skip to main content
13,299,007 members (41,744 online)
Rate this:
Please Sign up or sign in to vote.

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.
Posted 18-May-11 1:15am
Updated 18-May-11 1:32am
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

Rate this: bad
Please Sign up or sign in to vote.

Solution 1


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.171207.1 | Last Updated 5 Dec 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100