Subject | Re: [IBO] SQL Help |
---|---|
Author | Helen Borrie |
Post date | 2001-03-29T00:38:09Z |
At 04:18 PM 28-03-01 -0800, you wrote:
Change handler code to
begin
if Active then Close;
ParamByName('date').asdate := wwDBDateTimePicker1.date;
Open;
end;
1. Are your KeyLinks correct?
2. Do you have a Datasource property on this query that might be interfering with your query parameters? Drop a TIB_MonitorDialog on your form and inspect the statement that is being sent to the server. Paste the relevant output back here to the list.
3. If you have eliminated key problems and the problem persists, paste your SQL into the Cursor window of IB_WISQL and run it to see if you get the output you are expecting.
Cheers,
Helen
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________
>Hi allYou don't need to Unprepare for SELECT queries but, if you do, ParamByName will detect an unprepared statement and prepare it for you. In any case, the new parameter values have to be assigned to a dataset that is *already* prepared...
>Would someone please know why I cannot retreive the proper records in this
>query?Date is no problem but notetype is?
Change handler code to
begin
if Active then Close;
ParamByName('date').asdate := wwDBDateTimePicker1.date;
Open;
end;
>SQL IBOquery1:Why are you ordering by notedate descending, when all of the output has only one date?
>select * from notesdata
>where notedate = :date
>and notetype = 'D'
>order by notedate descending, notetime descending
>it does retrieve for the proper day but not the notetype, retreives allSuggestions (after fixing the parameter assignment problem) :
>notetypes????
1. Are your KeyLinks correct?
2. Do you have a Datasource property on this query that might be interfering with your query parameters? Drop a TIB_MonitorDialog on your form and inspect the statement that is being sent to the server. Paste the relevant output back here to the list.
3. If you have eliminated key problems and the problem persists, paste your SQL into the Cursor window of IB_WISQL and run it to see if you get the output you are expecting.
Cheers,
Helen
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________