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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with DateTime Parameters

Status
Not open for further replies.

stevegro

Programmer
Aug 26, 2002
3
0
0
US
The problem I am having is that I have created an SQL 2000 stored procedure that has two parameters StartDate and FinishDate, which are smalldatetime data types. I have also created a Crystal 8.0 report with this stored procedure. I am having problems passing the parameters to the report from my VB 6 app because crystal is looking for a string. This is the code that I have now is:

With crpt1
.ReportFileName = constReportPath & stReportFileName
.ParameterFields(0) = "@StarDate;" & _
format(dtbeginDate, "mm/dd/yyyy hh:mm:ss")& ";true"
.ParameterFields(1) = "@FinishDate;" & _
format(dtEndDate, "mm/dd/yyyy hh:mm:ss") & ";true"
.Action = 1
End With

The error I get is "The specified value type is different to the current value type".


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top