Parameter assignment problem with ADOQuery using Birebird DB and ODBC driver
- From: "GD" <nospamp_george_s_du@xxxxxxxxx>
- Date: Fri, 22 Jul 2005 10:20:56 -0500
Hi,
I am using Firebird database with XTG ODBC driver, I have a 'big' problem
with parameter assignment of TADOQuery component uing the following simple
query under Delphi 7:
strSQL := 'select * from ASSOCIATE where LASTNAME = :LName';
ADOQrySelect.Active := False;
ADOQrySelect.SQL.Clear;
ADOQrySelect.SQL.Add(strSQL);
ADOQrySelect.Prepared := True;
ADOQrySelect.Parameters.ParamByName('Lname').DataType := ftString;
ADOQrySelect.Parameters.ParamByName('Lname').Direction := pdInput;
ADOQrySelect.Parameters.ParamByName('LName').Value := 'Bond';
ADOQrySelect.Active := True;
It raises OleException with message: "Parameter object was improperly
define" when the compiler is trying to run "ADOQrySelect.Active := True;".
However, if I use static SQL query string, it works fine.
Can someone please points out what is wrong?
TIA,
GD
.
- Follow-Ups:
- Re: Parameter assignment problem with ADOQuery using Birebird DB and ODBC driver
- From: Vitali Kalinin
- Re: Parameter assignment problem with ADOQuery using Birebird DB and ODBC driver
- Prev by Date: Re: Best practices...
- Next by Date: Re: Parameter assignment problem with ADOQuery using Birebird DB and ODBC driver
- Previous by thread: Best practices...
- Next by thread: Re: Parameter assignment problem with ADOQuery using Birebird DB and ODBC driver
- Index(es):