Error "input parameter count is less than expected"

The official tester's forum for ZeosLib 7.1. Ask for help, post proposals or solutions.
Post Reply
User avatar
M56OBER
Fresh Boarder
Fresh Boarder
Posts: 20
Joined: 28.10.2005, 12:33
Location: FRANCE

Error "input parameter count is less than expected"

Post by M56OBER »

Hello

In DELPHI XE and mySQL 5.0.37
I am using ZEOSDBO-7.1.2-Stable, When I modify a record have this error
"input parameter count is less than expected"

with the same query on other record i have no problem!

You have already seen it?

Thank you
Best regards
User avatar
M56OBER
Fresh Boarder
Fresh Boarder
Posts: 20
Joined: 28.10.2005, 12:33
Location: FRANCE

Re: Error "input parameter count is less than expected"

Post by M56OBER »

Can be a track?

The problem appears when we initialize in zero a key then when we try then to change this value.

We can observe that in this function

function TZEmulatedPreparedStatement.PrepareAnsiSQLQuery: RawByteString;

by
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Re: Error "input parameter count is less than expected"

Post by EgonHugeist »

Hi,

An example or your code-spipped would be usefull. Than i can check what's going on..
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
User avatar
M56OBER
Fresh Boarder
Fresh Boarder
Posts: 20
Joined: 28.10.2005, 12:33
Location: FRANCE

Re: Error "input parameter count is less than expected"

Post by M56OBER »

CREATE TABLE `table01` (
`keyfield` int(11) NOT NULL default '0',
`dtfield` date NOT NULL default '0000-00-00',
`infofield` varchar(10) default NULL,
PRIMARY KEY (`keyfield`,`dtfield`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8

qy := TZquery.create(application);
qy.Connection := Datamodule1.DOSOC;
qy.SQL.Text := 'select * from table01';
qy.Open;

qy.Append;
qy.FieldByName('keyfield').value := 1;
qy.FieldByName('dtField').value := Date;
qy.FieldByName('infofield').value := 'test';
qy.Post;

qy.Edit;
qy.FieldByName('keyfield').Value := 1;
qy.FieldByName('dtField').Value := NULL;
qy.FieldByName('infofield').AsString := 'test';
qy.Post;

qy.Edit;
qy.FieldByName('keyfield').value := 1;
qy.FieldByName('dtField').Value := date;
qy.FieldByName('infofield').value := 'test';
qy.Post;

qy.Free;

The las post cause an error "input parameter count is less then expected"
In fact the test of null value on keyfield don't work

In the code, we must test null value before post.
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Re: Error "input parameter count is less than expected"

Post by EgonHugeist »

Nice, something to work with. I'll track your issue now.. Give you a second reply than.
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Re: Error "input parameter count is less than expected"

Post by EgonHugeist »

Hi,

i was able to fix it (except you're using option doPreferPrepared -> will happen next).
Patch done \R2998 \testing-7.2.
I did add your example to our tests. So actually i've an error for MySQL-REALPrepareds. Hope i can resolve it too and i hope you can test it too?
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
Post Reply