I have a Problem with IBDAC 5.3.8 an Delphi XE4.
I've a simple table with five fields:
Code: Select all
CREATE TABLE TEST (
ID INTEGER NOT NULL,
FIELD1 VARCHAR(10),
FIELD2 VARCHAR(10),
FIELD3 VARCHAR(10),
FIELD4 VARCHAR(10)
);Code: Select all
select * from test where id = :idIf I set the SQL the paramcount = 1 (without known patatype) but if I prepare, I have paramcount = 6, one for each field and one for the param.
4 params has the paramtype pfOuteput and two (both the param ID) pfUnknown.
if i set "IBCQuery1.Parambyname('id').AsInteger := 1" and I open the query I get these exception:
Dynamic SQL Error
SQL error code = -804
SQLDA missing or incorrect version, or incorrect number/type of variables
This happens alsow, if I set one of the ID-parametes to the value.
My Code:
Code: Select all
try
IBCConnection1.Connect;
caption := inttostr(IBCQuery1.ParamCount); // ParamCount = 1
IBCQuery1.Prepare;
caption := inttostr(IBCQuery1.ParamCount); // ParamCount = 6
IBCQuery1.Parambyname('id').AsInteger := 1;
IBCQuery1.Open; // Exception happens
IBCQuery1.Close;
except
On e:Exception do
Memo1.Lines.add(e.message);
end;
IBCQuery1.UnPrepare;
IBCConnection1.Disconnect;
Greetings Jan