Message="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's really impossible to tell without first seeing some code. You should at least try running the software under the debugger and see where the error is occurring. When you find that, post some of that code here--just the relevant pieces--and we should be able to better diagnose your problem.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: I luv teh choco The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
-
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:
the code is very simple. void proc() { ... callreport(1, 'o'); ... } void callreport(int a, char b) { reportJob = new ExReport() //The ExReport is a Crystal Report connected to // SQL Server 2000 reported by a store //procedure with one input type char reportJob.SetParameterValue(0,b); //"The error happened at this line ... } That's all. The code looks simple but it gave me a lot of headache. Thanks