?
Solved

Delphi  "class EDBEngineError with message 'Invalid parameter'"

Posted on 2006-05-02
3
Medium Priority
?
1,401 Views
Last Modified: 2012-08-14
The program seems to run fine for a period of time, then for some unkown reason, after doing a recompile I begin getting this error message "class EDBEngineError 'Invalid Parameters.'"  Everything is basically the same and I have been able to determine which pascal unit is the offender, but not why. Any help? I have open and close statements for my tables and querys.
0
Comment
Question by:drpapanick
3 Comments
 
LVL 15

Expert Comment

by:mikelittlewood
ID: 16587178
What database and connectivity are you using.

Can you show use your calling code as well.
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 16587728
just for ask, what mikelittlewood already asked ;-)
0
 
LVL 1

Accepted Solution

by:
Balshe earned 1000 total points
ID: 16594195

Let's consider this

Var

qry:TQuery;

qry:=TQuery.Create(self);
qry.SQL.Add('select * from TABLE_1 where ID=:ID ');
qry.ParamByName('id').AsInteger :=1;
qry.open;
...
...
qry.close;

qry.SQL.Add('select * from TABLE_2222 where EMP_NAME=:EMPLOYEE_NAME ');
qry.ParamByName('EMPLOYEE_NAME').asstring:='Usher';
qry.open;

you will get this error because you should clear the sql query before resuingit

qry.close;
qry.sql.clear;
qry.sql.add('............');
qry.open;


0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question