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!

passing Date Parameter to Stored Procedure

Status
Not open for further replies.

TorreyKite

Programmer
Mar 27, 2003
1
US
I'm using Crystal Reports Pro 6.0
connecting to MS SQL Server 7

my SP....
CREATE PROCEDURE get_Daily_Lotus

@Location char(15),
@WeekStart smalldatetime
AS
.....

after selecting my SP, CR6 prompts me to enter in the parameter values.

entering in a normal date such as "12/22/03" raises the error: "Parameter number 2 is invalid."
CR does not allow me to continue in the createion of the new report.

I have tried other date formats such as "2003-12-16 00:00:00" which is what SQL Query Analyzer returns.
or "12/22/2003"

I've read about problems with date conversion between CR and SPs... but how can I get around this one?

Thanks for your help

TK :)
 
Rather than trying to resurrect an old version of Crystal to help you test with (I doubt I've had that for years), I'd suggest just making the smalldatetime a varchar and casting it to a smalldatetime in the SP.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top