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

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

String[4]: the Size property has an invalid size of 0.

Posted By:      Posted Date: September 23, 2010    Points: 0   Category :ASP.Net

Hi, I am new to asp.net and I don't know what to do on this problem, can someone give me a hint/advice on how I can make my insert do the task, here is my stored procedure:

-- =============================================
-- Author: <Lau>
-- Create date: <092210>

View Complete Post

More Related Resource Links

Issue with Size Property has an invalid size of 0


In my code I have:

SqlParameter param = new SqlParameter("ID", id);
                param.Direction = ParameterDirection.InputOutput;
                wrapper.ParameterCollection.Add("StudentObjectiveID", SqlDbType.Int).Value = objectiveid;
                wrapper.ParameterCollection.Add("SessionID", SqlDbType.Int).Value = sessionid;
                wrapper.ParameterCollection.Add("StaffID", SqlDbType.Int).Value = staffid;
                wrapper.ParameterCollection.Add("EnteredDate", SqlDbType.DateTime).Value = entereddate;
                wrapper.ParameterCollection.Add("Achievement", SqlDbType.NText).Value = Achievement;
                wrapper.ParameterCollection.Add("SessionStudentID", SqlDbType.Int).Value = session_student_id;
                wrapper.ParameterCollection.Add("ImageName", SqlDbType.NVarChar, 255).Value = imagename;
                wrapper.ParameterCollection.Add("ActualDate", SqlDbType.DateTime).Value = actualdate;
                wrapper.ParameterCollection.Add("FileType", SqlDbType.VarChar, 10).Value = filetype;

                int result = wrapper.ExecuteNonQuery();
                id = (int)param.Value;

And in the relevant stored procedure I

Increase string size in Crystal Reports for VS 2010

Hi guys, I have a field in my dataset with type nvarchar(1000). when I link it to crystal reports, it converts it to a field of type string with length set to 100. As a result of that, the string in that field is being truncated on the report. How can I increase the string length to 1000? (I already checked the "Can grow" option). Thanks, Sam  

DPAPI encrypted string size?


Hi All,

I am now using DPAPI to encrypt some private keys and store them into a database, the system works fine, however, i found some issue with Window 7 x64. The story is like bellow:

the key we are going to encrypt is a fixed length string, 32 characters, actually it's a GUID. and I need to encrypt them by DPAPI and encode the result by base 64, and thus will generate somehow a string with about 200 characters, I use a varchar(255) to store it in database. but for Windows 7 x64, the result seems much longer, more than 300 characters. so our application fails to save it to database.

can anyone tell me what is the expected size by encrypting by DPAPI? or for my case, how long the database column should be sufficient?


Thank you in advance and waiting for your suggestion.

Liang(China) From SAP

"Target string size is too small to represent the XML instance"


This is a tough error....

The situation:  we are trying to manage Stored Procedures (ALTER, CREATE, DROP statements) on one of our SQL2005 servers and this error spews out:

"Target string size is too small to represent the XML instance"

Now this script i wrote (simple alter statement adding a column) works on 4 other versions of SQL 2005, but when i try a certain server, i get that error

Searching Google, Yahoo, and MSN, all three point to one single instance of this error, right here on Don Keily's blog


 and unfortunately... no solution  :(

Maybe in the 3 months since that post, someone might have run across that and knows how to fix?

How do you set the LocalConnectionString Max Database Size property on the RDA object in C++?


How do you set the LocalConnectionString Max Database Size property on the RDA object in C++?

We have an C++ application running under PPC 2003. The SQL Server Compact edition 3.5 service pack 2 is installed.

We have successfully created a local database using the DBPROP_SSCE_MAX_DATABASE_SIZE property and set the size to 386mb.

The local database can be written locally to up to the Max Database Size.

When we perform a Pull operation with the RDA object the Pull fails when we set the Max Database Size property on the RDA LocalConectionString.

When we perform a Pull operation with the RDA object the Pull succeeds when we set only the Data Source property. But we can only Pull up to 128mb (the default size).



Reduce ASP.NET Page size and complexity using JQuery

This is my first post on asp.net blog. ASP.NET Ajax and JQuery are two different ajax framework. In this post I will show, how we can enhance gridview using ASP.NET Ajax and JQuery. I also compare the implementation of these frameworks. In next posts i will explain more about JQuery and ASP.NET Ajax and also tell you "How to combine the power of both framework". My Future post will related to ASP.NET and related frameworks.

abstract away the source of the connection string using a class with a static property.

ASP.NET provides a configuration system we can use to keep our applications flexible at runtime. In this article we will examine some tips and best practices for using the configuration system for the best results.

The element of a web.config file is a place to store connection strings, server names, file paths, and other miscellaneous settings needed by an application to perform work. The items inside appSettings are items that need to be configurable depending upon the environment, for instance, any database connection strings will change as you move your application from a testing and staging server into production.

Let's abstract away the source of the connection string using a class with a static property.

Set Custom Paper size in C#.net 3.5


Dear All,

I have to set custom paper size 6X8 inches

plz tell sugest me code how to do it.

in C#.net 3.5

i m using Asp.net 3.5 Crystal report

i have to do it programiticlly



Reduce Image Size


How to reduce the image weight using asp.net, without lose of image quality and image pixels. For example i have an image with the size of 4 MB (3024*2045), so how to reduce the image weight ie 4 MB to 1 MB without lose quality in the same pixels ie(3024 * 2045) using asp.net.

Detect Browser Screen Size??


Hi Everyone,  I need to detect the size of the user's screen for mobile devices (especially the BlackBerry). I've read a lot of pages that seem to refer me to the Request.Browser object, but I'm finding that this object doesn't have the correct values. For example, I have a BlackBerry and when I use the Request.Browser to get the screen size, it tells me it is 640x480. Well, I know it's not that big since an image of 300px wide just barely fits. Also, when I run on my desktop browser, it also says my screen is 640x480. I can assure you, it is not 640x480! ha!

  How does anyone reliably get the browser's screen size?? Do I have to revert to some kind of JavaScript? If so, where can I read more about it? Will it be any more reliable? Someone must have an idea about this. Thanks in advance!!

Obtain mobile device screen size



I am trying to get the screenHeight and width:


 // Get MobileCapabilities from current Request.Browser
        MobileCapabilities currentCapabilities = (MobileCapabilities)Request.Browser;
        // get a property of the  browser 
        Response.Write(currentCapabilities.ScreenPixelsHeight +  " <br>");
        Response.Write(currentCapabilities.ScreenPixelsWidth  + " <br>");


 but this is always show that the Height is 480 & the width is 640

I am trying on HTC with Opera Mobile 9.5

Any Advice?

AsyncFileUpload: Throw Error on image size


I have an AsyncFilUpload that is used to upload  to my site. On the server side I have code that checks the width and height of the image and will only save the image if it is within the limits buit I can't figure out how to get the AsyncFileUpload control to show an error when this happens. Can anyone give me any pointers?


Setting size of Grid Since Ajax Resizer Changed It


I'm sure that wasn't a very good subject, but I couldn't think of a better one. What I have is a page that has an UpdatePanel on it with a GridView control in it. It was originally displaying at a particular height and width according to the CSS style I have setup for it in my style sheet. However, since adding an AJAX Resizer control to the UpdatePanel, it is now defaulting to a much smaller size.

How do I get the grid to default to that same height and width that is in its CSS class? I don't mind putting it in the ASPX page or whatever, just need the grid to default to a larger size than the small little box it defaults to since adding the AJAX resizer. 

Size of jQuery datepicker popup


I have several mvc applications all using the jquery datepicker. One of them the popup appears double size (height and width), obvously it's something I've inadvertantly changed, probably in the css, but I can't figure out what it is. I have tried/applied a few themes and css/site master from the mvc code templates on codeplex, but I just can't figure out what did this one.

Any ideas ?

Owner-drawn ListView and nonstandard subitem size: selection problems.

Hello, I have a ListView whose first column is owner-drawn and items can be selected (I had to jump through hoops to draw the focus rectangle correctly). The problem is, my custom drawing displays the text in a wider font than normal, and only for this column. And when I click an item to select it, the right part of the text does not react, because the listview doesn't "know" there is text there (since it "thinks" the text is smaller). How can I correct this? Is there a "hit test" or "measure item" event or something, to tell the list view to consider a wider zone for clicks?
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