This forum is for the sole use of CRD users. ChristianSteven Software will not accept any responsibility for the contents.

General Forum
Start a New Topic 
Author
Comment
Passing parameter to custom task (SQL Procedure)

i am calling a custom task (executing a sql procedure) from a dynamic schedule, when i pass the hard coded value ('7/2/07') to sql procedure's parameter (RecDate) then its running fine but, when i was trying to pass CRD constant(CurrentDate) over here then an exception is raised. Exception is:
"Batch_Trial_Notification - Task Execution: Execute SQL Procedure[Make entry for notes] - [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near '-'."

how to resolve this?

And also guid me that what format is supported by CRD queries because i want to give some data into parameter like in sql. e.g. convert(varchar,getdate()) + '-' + 'ABC123'

Re: Passing parameter to custom task (SQL Procedure)

Hi,
You may need to check the format of the date constant (CurrentDate) you are passing to the DB, note that you can edit this to have the format you need. In your case, the format field below the CRD Constant should have something like MM/dd/yy before you insert it in the required field.

HTH

Re: Passing parameter to custom task (SQL Procedure)

Ok, date parameter is now resolved by changing its format (but id on't now why because the date value was 7/2/07 and it will be used for both mm/dd/yy or dd/mm/yy). however i have another problem with file path value 'Server1CustomerDocument' i just want to pass this value to a parameter. When i hard coded it, then it is running fine but, when i pulled it from database using data item the CRD raise an error during execution. Error is:
Batch_Trial_Notification - Task Execution: Execute SQL Procedure[Make entry for notes] - [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near ''.
I tried these values from DB
1. Server1CustomerDocument
2. 'Server1CustomerDocument'
3. '\Server1CustomerDocument'
but in all cases CRD raising the error. Now what to do?

spanish french german
italian japanese chinese
  korean  
   
 User Forum

CRD