Click here to Skip to main content
       

ASP.NET

 
QuestionResponse.Redirect behavior PinmemberAndrew Stoute10-Dec-12 9:11 
AnswerRe: Response.Redirect behavior PinmemberDavid Mujica10-Dec-12 10:01 
GeneralRe: Response.Redirect behavior [modified] PinmemberAndrew Stoute10-Dec-12 10:16 
AnswerRe: Response.Redirect behavior PinmemberShameel10-Dec-12 21:28 
AnswerRe: Response.Redirect behavior Pinmember@AmitGajjar11-Dec-12 6:54 
AnswerRe: Response.Redirect behavior Pinmemberryanb3112-Dec-12 4:36 
GeneralRe: Response.Redirect behavior PinmemberAndrew Stoute12-Dec-12 4:46 
QuestionERROR while updating image in database PinmemberAni199110-Dec-12 6:18 
when i m trying to update image in sql database i m getting error as"Cannot bulk load. The file "System.Byte[]" does not exist."
my code is as follows.pls help.
protected void Button1_Click(object sender, EventArgs e)
{
{
if (FileUpload1.HasFile)
{
byte[] productImage = FileUpload1.FileBytes;


string constr = "Server=AOD257; Database=Edusocial;User ID=sa; Password=password";
string query = "UPDATE Profile SET [Pic] = (SELECT Pic.* from Openrowset(Bulk '" + productImage + "', Single_Blob) MyImage) where Id =11651658";
 
SqlConnection con = new SqlConnection(constr);
SqlCommand com = new SqlCommand(query, con);
com.Parameters.Add("@Pic", SqlDbType.Image).Value = productImage;
 
con.Open();
int result = com.ExecuteNonQuery();

con.Close();
 
if (result > 0)
{
Response.Redirect("Default.aspx");
}
}
else
{
lblmessage.Text = "Please Select Image File";
lblmessage.Visible = true;
}
}

}
GeneralRe: ERROR while updating image in database Pinmemberjkirkerx10-Dec-12 10:37 
GeneralRe: ERROR while updating image in database PinmemberAni199110-Dec-12 21:15 
GeneralRe: ERROR while updating image in database PinmemberRichard Deeming11-Dec-12 0:54 
GeneralRe: ERROR while updating image in database Pinmemberjkirkerx11-Dec-12 7:26 
Questionmaking a class with streamreader thread safe - perhaps using monitor or a singleton Pinmemberjkirkerx9-Dec-12 11:45 
GeneralRe: making a class with streamreader thread safe - perhaps using monitor or a singleton Pinmemberjkirkerx9-Dec-12 16:14 
QuestionDisplay Images from a database in a tile view PinmemberMember 94655649-Dec-12 5:42 
AnswerRe: Display Images from a database in a tile view PinmemberAli Al Omairi(Abu AlHassan)10-Dec-12 2:23 
Questionlinq connection in asp.net PinmemberJonBrynjar8-Dec-12 3:58 
AnswerRe: linq connection in asp.net Pinmember@AmitGajjar11-Dec-12 7:00 
QuestionChange root path PinmvpJohn Simmons / outlaw programmer8-Dec-12 3:40 
AnswerRe: Change root path PinmemberRichard Deeming10-Dec-12 1:35 
GeneralRe: Change root path PinmvpJohn Simmons / outlaw programmer10-Dec-12 1:42 
AnswerRe: Change root path Pinmember@AmitGajjar11-Dec-12 7:10 
QuestionUpdating the column using entity framework Pinmemberindian1437-Dec-12 12:46 
Questionasp.NET composite control cannot raise an event Pinmembermichal.cerbak7-Dec-12 4:50 
Questionhow to convert hex to rgb color code in asp.net PingroupDeenuji vellore6-Dec-12 23:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web04 | 2.8.140916.1 | Last Updated 19 Sep 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid