Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL server Stored Procedures

Status
Not open for further replies.

brishanny

MIS
Oct 3, 2003
17
US
I am using SQL server 2000 and CR 9.0

I created a stored procedure for the datasource for CR to use that accepts 2 paramaters. I notice in crystal you can only make these two paramaters a discrete or range paramater.

Can you not choose the 'Allow multiple values' checkbox to use the 'Discrete and Range Values' option.

If so, how?

I need the Discrete and Range value for my intranet application that uses .NET. I have a report application page that based on the report dynamically creates the proper controls for the report. Some reports I choose to offer the user to select one item or choose a blank value in a dropdown box to choose a range of values.

If I use a view I can properly format my paramaters to accept 'Discrete and Range paramaters' and function properly.

Thanks

 
The problem your are experiencing is a limitation in SQL Server. SQL Server doesn't have an array data type so it cannot handle more than one value being passed in a parameter.

To get around it, you will have to get creative in your .NET application. Perhaps you can accept all the values from within the application, then string them together, seperating the values with a delimiter, then pass it to SQL Server as a string, and parse the values out in your Stored Procedure before using them there.

Hope that helps.

~Brian
 
Thanks for the help. Your suggestion makes perfect sense.

Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top