 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
GD Guest
|
Posted: Fri Jul 22, 2005 3:20 pm Post subject: Parameter assignment problem with ADOQuery using Birebird DB |
|
|
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
|
|
| Back to top |
|
 |
Vitali Kalinin Guest
|
Posted: Fri Jul 22, 2005 3:22 pm Post subject: Re: Parameter assignment problem with ADOQuery using Birebir |
|
|
Have you tried to assign Size for parameter?
Anyway AFAIK Firebird with ADO is not very promissing combination and ADO
with ODBC either.
Regards,
Vitali
|
|
| Back to top |
|
 |
GD Guest
|
Posted: Fri Jul 22, 2005 3:36 pm Post subject: Re: Parameter assignment problem with ADOQuery using Birebir |
|
|
Yes, I set the size of 10.
Thanks for reply.
GD
"Vitali Kalinin" <vitkalinin (AT) yahoo (DOT) com> wrote
| Quote: | Have you tried to assign Size for parameter?
Anyway AFAIK Firebird with ADO is not very promissing combination and ADO
with ODBC either.
Regards,
Vitali
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|