Subject Re: [IBO] Parameters in 5,000,000 words or less
Author Helen Borrie
Paul,
What are the monitor and the debugger showing as the SQL statement?

Have you run this query through ib_wisql with a constant in the WHERE clause to check whether the statement actually returns anything? i.e. the lack of output may be due to the joins, not the search criteria.

Have you inspected the dtStart.Date (??variable ??record structure field?? can't tell what it is..) before you call the ParamByName() method? If it's coming from an editbox input field, it may require some manipulation before it can evaluate to a date. (Delphi dates are a real headache outside the US...)

....

At 04:55 PM 03-05-01 -0400, you wrote:
>Dear List:
>
>I am trying to figure out Parameters, and it is not going well:
>
>Here is the SQL:
>
>SELECT TIMECARD.HOURS, TIMECARD.START_DATE_TIME, PHASE.MYOB_TASK_NO,
>PHASE.DESCRIPTION, PROJECT.PROJECT_NAME,PROJECT.RATE_PER_HOUR,
>TIMECARD.HOURS*PROJECT.RATE_PER_HOUR AS CALCAMT
>FROM TIMECARD
>LEFT JOIN PHASE ON TIMECARD.PHASE_ID=PHASE.PHASE_ID
>LEFT JOIN PROJECT ON PHASE.PROJECT_ID=PROJECT.PROJECT_ID
>WHERE TIMECARD.START_DATE_TIME > :STARTDTTM
>
>As you can tell the Parameter is :STARTDTTM
>TIMECARD.START_DATE_TIME is defined as a DATE type under dialect 1
>
>I am using TIBOQuery to feed the result into ReportBuilder V4.23, the
> development tool is Delphi 3, and the parameter is filled thusly
>
>qryReport.ParamByName('STARTDTTM').AsDateTime := dtStart.Date;

insert here

Showmessage('STARTDTTM is ' + DateTimeToStr(dtStart.Date));


Helen


All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________