.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

expanding the length of sqlstring to greater than 8000 chars

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :


I have a clr function which accepts sqlstring as a parameter. I have set SqlFacetAttribute.MaxSize to -1.

The problem is that the string value is getting truncated to 8000 chars. Is there any way of increasing the capacity. Is there any alternate data type to sqlstring.

View Complete Post

More Related Resource Links

How to set minimum length of chars ina text box

I have a textbox1, want to set a minimum length of atleast 8 chars, how to do the min length validation. Thank you for thhe helpful info. 

Invalid length for a Base-64 char array for my coding in ASP.net C#. How to solve it ?


Hi Friends ,

I have done encrypted password and decode but i got error  like  this  " Invalid length for a Base-64 char array" .

Pls help . Thanks


psswd = txtPassword.Text;

pwed = base64Decode(psswd);

public string base64Decode(string sData)
            System.Text.UTF8Encoding encoder = new System.Text.UTF8Encoding();
            System.Text.Decoder utf8Decode = encoder.GetDecoder();
            byte[] todecode_byte = Convert.FromBase64String(sData);
            int charCount = utf8Decode.GetCharCount(todecode_byte, 0, todecode_byte.Length);
            char[] decoded_char = new char[charCount];
            utf8Decode.GetChars(todecode_byte, 0, todecode_byte.Length, decoded_char, 0);
            string result = new String(decoded_char); return result;

Web Q&A: Storing SQL Data, URL Query Length, and More


Find out the best way to store large amounts of XML data in SQL Server, along with the performance implications. What's the maximum length of an XML query to SQL Server in a URL?

Edited by Nancy Michell

MSDN Magazine May 2003

How to make expanding/collapsing CollapsiblePanelExtender from code behind smooth and animated


I've got a CollapsiblePanelExtender in place on a panel in test and it works like a champ. (I get excited about the simplest things).  When I click the panel header it expands and collapses with smooth animation, as expected and desired.

But when I change its state via code behind, it seems I am merely changing its state and somehow bypassing the javascript that controls the smooth animation.

My markup is out of the box. I have added code behind and some javascript, but I am missing the connection.  Here is the javascript:

function pageLoad(sender, args)

function smoothAnimation()
    var collPanel = $find("CollapsiblePanelExtender1");
    collPanel._animation._fps = 45;
    collPanel._animation._duration = 0.50;


And here is the code behind:

protected void btnExpand_Click(object sender, EventArgs e)
    this.CollapsiblePanelExtender1.Collapsed = false;
    this.CollapsiblePanelExtender1.ClientState = "false";

protected void btnCollapse_Click(object sender, EventArgs e)
    this.CollapsiblePanelExtender1.Collapsed = true;

Question about Greater/Less Than if Value is Null


Currently on my site I am displaying wins and loses based on the score of an event. I got this to work except when both of the values are null. Until an event happens the values are null so when I am trying to show a greater than or less than statement that is grabbing a null value I get an error because it's not in the correct format. I also checked out this article here: http://www.codeproject.com/KB/cs/AgileWare_Convert_Int32.aspx

This code is within a DotNetNuke module right now and crashes because of this format. So basically I am looking to modify my statements below in some way where if the value is null it will still display on our site. Obviously if the values both show 0-0 it works but that isn't really an option for me to use prior to the event happening. Any help is appreciated. Thanks!

I've tried both Convert.ToInt32:

  if (objAwaySchool != null)
                    string strSchoolId

Process.Start - arguments length restriction to 2080 characters

Hi, I'm wondering why is there a limit to "The sum of the length of the arguments and the length of the full path to the process " to 2080? I see that the documentation says that a Win32Exception is thrown if this exceeds 2080 characters. Can someone please explain to me this limit? I'm trying to start a process and I have a lot of arguments to pass, and of course ... I exceed the limit of 2080.   Thanks, Ionut.

Regex for checking number greater than 9

Hi All , I need to write a regex which can check for a number greater than equal to 9 .  

How to Pass higher Length of Byte Array to the remoting method

Dear all,I am using a windows application and the businness logic is present in the remote server.Once particular method takes bytearray as input parameter...Whenever the method call is made the function returns value .This is limited for the particular bytearray length. (4109228 bytes).If the length of bytearray crosses 4109228 bytes.I am getting an error that "input stream is not valid binary format".How to Pass higher Length of Byte Array to the remoting method... Greater than 4 MB?I believe something is missing in web.config or app.config...?What could be the issue...? Any sugesstions are welcome....ThanksRavikumar

DPI greater than 100% causes RDP problems

Hi everyone, we are developing a program combining several remote control programs. Recently we exposed a problem with the RDP ActiveX control from mstscax.dll in conjunction with using dpi at 150%. I created a test solution in Visual Studio 2010 and put the control "Microsoft RDP Client Control - version 8" on a new form. If you reconnect to a disconnected RDP session and the left side of the rdp control is NOT on the left edge of the monitor we have an "unclickabl" area in the rdp connection. Seriously if you logout instead of just disconnecting rdp control works as expected. Can anyone give me a hint how we can solve it, if it possible? greetings    

Problem to use unicode chars in yahoo mail

Hi i have a problem to send email via smtpClient class to yahoo mail. if i send a unicode email from non-Yahoo account to yahoo mail, it works correctly (display unicode chars correctly without any making change), but when i send from yahoo account to yahoo mail, it does not display characters correctly and i should change it's encoding to UTF8. can anybody help me to work-around this problem ? Please see my previous thread in this link. thanks in advancehttp://www.codeproject.com/KB/codegen/DatabaseHelper.aspx

Convert Data from TXT file and face a length issue! Need help!

Hi All, I am trying to convert some TXT files in to sqlserver database by using SSIS.  The problem I am facing right now is that some TXT files I have are fixed with line length 286.  However, for the some other TXTs they have 296 characters per line. The reason why this happened is some one added one more field before generating those TXTs.  Instead of creating two SSIS packages for converting those TXTs, can I find another way to get around this?   

Cleanest way of setting max string length for text in GridView cells?

I want to make sure that each row in the table is the height of one line of text only.  I know you can set RowStyle-Wrap="false", but I also don't want any really wide rows.  I know I can go through each cell on RowDataBound or something and cut it to a particular length and then append an ellipsis on the end, but is there a neater way of doing the same thing?

The maximum string content length quota (8192) has been exceeded while reading XML data.

Hi, I have been working on implementing a WCF service and have run into this problem with the maxStringContentLength.  I have read a bunch of posts here on how to correct it and none of them have worked.  I have updated my web.config in my local IIS5 published service to be maxStringContentLength="2147483647" and have updated my application's app.config to be maxStringContentLength="2147483647".  I delete all DLL's, rebuild, restart IIS, make sure all VS 2008 virtual webs are stopped, republish multiple times...even reboot my machine and I continually receive the following error message:The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/qlStatement. The InnerException message was 'There was an error deserializing the object of type System.String. The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 171, position 35.'.  Please see InnerException for more details.I am running the service on my local machine: Win XP SP2, IIS5, .Net 3.5, VS 2008Here is my WCF service's servicemodel section of the web.config:    <system.serviceModel>    <bindings>      <wsHt

Search_DB expanding enormously after installing wss-kb973410-fullfile-x86-glb

Greetings. On our main production server MOSS 2007 sp2 we had a problem with fitering not working for lists with more than 500 entries. One of our employees found that the hotfix was released that should help, the wss-kb973410-fullfile-x86-glb Installing the hotfix fixed the problem with filters, but after a week, the server slowed to a crawl. Investigation showed that full text search database called "sharepointcommondbname"_Search_DB was taking whole hard drive and doing insane number of operations. Since we had to have the site running, and there was no understanding how to fix the problem FAST (since there are alot of tables in the db and nothing indicates which tables can be safely cleared) we had to revert to only possible move. We replaced the _Search_DB with its backup we had stored, but this backup was done before installation of the hotfix. Now, after some time, the problem returned again. Search_DB again ate all hard drive space and took all processor time. We once again replaced it with the backup, but we need a better solution now.   1) Is this a common bug? Is there a fix or solution? 2) When changing "preferences of farm service" (dunno hows it in english we got russian moss), the place where you can see database names and logins, they are GREYED. WE cannot change them. IS there a way to change them?  3) Is there a way to r

Pie show percentage greater than 100%

Hi all , i have a pie chart and show percentage as label ,i set label data as #PERCENT{P0} but when report runs it has 3 value: 58%,11%,32% you can see the 3 value add up to 101% is something else i need to set on label ? any help for this ?

Is there a limit to the length of a vb script job

This sounds stupid, but I created a ms sql server job that is activeX - language = vbscript The job is just a series of log statements. If I make the script > 300 lines long, I get errors. If I chop out some of the log statements, it works ok. Does anyone have any idea what is going on and how to get around / fix this? thanks jonathan
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend