Subject Re: [firebird-support] SQL error
Author Martijn Tonies
Check the .SQL property just before you open the query and
see what's actually inside it.

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com

This statement:-
var
ws_bdr_date : TDateTime

begin
ws_bdr_date := StrToDate(Edit1.Text);
with IBQuery1 do
begin
Close;
Sql.Clear;
Sql.Add ('Select adj.ADJ_NO, adj.SRC_PLU, adj.DEST_PLU, ' +
'adj.ADJ_TYPE, adj.QTY, adj.COST, ' +
'adj.SELL, adj.DEST_QTY, adj.DEST_COST, adj.DEST_SELL ' +
'from adj ' +
// 'where adj.ADJ_DATE
= "'FormatDateTime 'mm"/"dd"/"yyyy', ws_bdr_date) + '"' + //
'where adj.ADJ_DATE = ws_bdr_date ' +
'where adj.ADJ_DATE = ws_bdr_date ' +
' and adj.ADJ_SOURCE = ''Stock Adj'' ' +
'order by adj.ADJ_NO');
Open;
end;

using this statement returns "Dynamic SQL error
SQL error code -206
Column unknown WS_BDR_DATE ..."

What should I do?