"Value does not fall within the expected range"
-
Hi, I have a problem with the exception "Value does not fall within the expected range" and I haven't quite figured out what is wrong in my code. I have a store procedure that has a declared char for input. The store procedure is used by a Crystal Report filename. I want to pass a char from C# application that calls the Crystal report and passes a character to it. Somehow, I got the exception. I wonder if the character type in VS .Net 2005 is not compatible with a character type in SQL Server 2000. Any help? Thanks. Kyah:confused:
-
Hi, I have a problem with the exception "Value does not fall within the expected range" and I haven't quite figured out what is wrong in my code. I have a store procedure that has a declared char for input. The store procedure is used by a Crystal Report filename. I want to pass a char from C# application that calls the Crystal report and passes a character to it. Somehow, I got the exception. I wonder if the character type in VS .Net 2005 is not compatible with a character type in SQL Server 2000. Any help? Thanks. Kyah:confused:
It is not really clear in your post just what your are doing and who is generating the problem. You talk about Crystal reports and that is one source of errors, AND you talk about VS vs. SQL Server. To try and fire some help in the dark -- you will probably have to talk to your DBA first before talking to us. You may also need to go into more details as to how this character is defined, who it is passed to, and so on. Basically, when a problem occurs you need to investigate all aspects of every possible endpoint that generates a potential error. For example: a character is normally a character. However if you have a setting somewhere (or a type definition) that defines a character as being UNICODE then you will need to consider the fact that you are passing a UNICODE character into a database that is defined as ASCII instead of UNICODE. However with Crystal Reports in the middle, the error could be from Crystal -- but you don't say. You also do not indicate if the call into the Crystal thing has worked in prior versions of VS or not. That can make a huge difference in the cause of the problem. Do the homework and then try asking the question after you have done so.