You are not logged in.
Pages: 1
I test like this:
Q := TQuery.Create(aSQLDBConnection);
try
Q.SQL.Clear; // optional
Q.SQL.Add('select * from TABLE');
Q.SQL.Add(' WHERE ID_DETAIL=:detail;');
Q.ParamByName('detail').AsString := '123420020100000430015';
Q.Open;
Q.First; // optional
while not Q.Eof do begin
assert(Q.FieldByName('id_detail').AsString='123420020100000430015');
Q.Next;
end;
Q.Close;
finally
Q.Free;
end;
----------------
raise error:Parameter 'detail' not bound for 'detail';
In SynDB.pas line 3397
i := fParam.FindHashed(tmp);
if i<0 then
raise ESQLQueryException.CreateFmt('Parameter "%s" not bound for "%s"',[tmp,req]);
This statement has bug?
Offline
I've just added a similar regression test.
See http://synopse.info/fossil/info/3c704e4709
No problem to run such a query, with a prepared parameter.
Are you sure you are using the latest version of the source code?
I mean unstable 1.18 ?
Why DB connection are you using?
Offline
I've just installed the latest version of mORMot (1.18) and I'm running TestSQL3 program.
When the program performs test about external database (point 2.8) raises the error Parameter 'JOD' not bound for "select * from People where YearOfDeath=:YOD;"
The only way I have to complete the test program without errors, is substitute parameter YOD with the constant value 1872 in the where clause.
I'm working with Delphi XE3 - Windows Vista.
What can I do to solve the problem?
Thank you in advance
Davide
Offline
I just tried with XE4 and was able to reproduce the issue.
No issue with Delphi 7.
It should be fixed by http://synopse.info/fossil/info/08119ca38c
Sorry for the regression.
No, with the newly introduced test, it should not occur any more.
Thanks for your feedback!
Offline
thanks !
Offline
Great!
Thanks
Offline
Pages: 1