Asp.Net News
Free Tech Magazines
Asp.Net Web Hosting
Suggest Us
Link to Us
Feeds Subscription
Questions & Answers
Tips & Tricks
 System.Data.SqlClient.SqlException: SQL Server Internal Error. Text manager cannot continue with current statement.
Posted by charan on  5/15/2010 3:23:21 AM Category: Asp.Net 2.0
Add to my favorites
Email to friend
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["Safa"].ConnectionString); string branchid = ""; protected void Page_Load(object sender, EventArgs e) { branchid= Session["branchid"].ToString(); if (IsPostBack == false) { Image1.ImageUrl = "left1.ashx?BranchId=" + branchid; Image2.ImageUrl = "left1old.ashx?BranchId=" + branchid; } protected void Button1_Click(object sender, EventArgs e) {// update code SqlCommand cmdupdate = new SqlCommand("left1update", con); cmdupdate.CommandType = CommandType.StoredProcedure; con.Open(); cmdupdate.Parameters.AddWithValue("@BranchId", branchid); if ( FileUpload1.HasFile) { FileInfo left1info = new FileInfo( FileUpload1.PostedFile.FileName.Trim()); byte[] left1content = new byte[left1info.Length]; FileStream left1stream = left1info.OpenRead(); left1stream.Read(left1content, 0, left1content.Length); left1stream.Close(); cmdupdate.Parameters.AddWithValue("@imgleft1",left1content); } cmdupdate.Parameters.AddWithValue("@notel1",txtnotes.Text); if(cmdupdate.ExecuteNonQuery()!=0) { Functions.ShowAlertMessage("Updated....."); txtnotes.Text = ""; System.Threading.Thread.Sleep(2000); Image1.ImageUrl = "left1.ashx?BranchId=" + Session["branchid"].ToString(); Image2.ImageUrl = "left1old.ashx?BranchId=" + Session["branchid"].ToString(); }

procedure iam using

create procedure left1update(@BranchId nvarchar(50),@imgleft1 image, @notel1 nvarchar(200))
update tblImages set imgleft1old= CONVERT( image,imgleft1)
,imgleft1=@imgleft1 ,notel1=@notel1 where (BranchId=@BranchId)


when iam clicking the button my current image should store in imgleft1old field and the newly browse one should store in imgleft1 field

but it giving error
System.Data.SqlClient.SqlException: SQL Server Internal Error. Text manager cannot continue with current statement.

can you correct my code which helps me

Post Your Reply Post New Question

 Viewer's Reply
Using UPDATETEXT to update Image Column
Answered By Moderator1 on 5/17/2010 7:57:17 AM

I think you are trying to update an Image column in the tblImages table. Try to use UpdateText or WriteText SQL functions. For reference, use the below url,
Post Your Reply If you still have problem, post it again under this reply for better response.

Sponsored by
Introduction to Software Development
The JavaScript Anthology: 101 Essential Tips, Tricks & Hacks - Free 158 Page Preview
Simply SQL - Free 111 Page Preview!