I am using the following code to perform an insert 100 records, and returns me the following error:
var
I: Integer;
begin
UniQuery1.Close;
UniQuery1.SQL.Text := 'UPDATE OR INSERT INTO CARTAS(COD_CARTA, NOME_CARTA) VALUES(:A, :B) MATCHING( COD_CARTA)';
UniQuery1.Params.ValueCount := 100;
for I := 0 to 100 -1 do
begin
UniQuery1.Params[0].AsInteger := i + 1;
UniQuery1.Params[1].AsString := 'CARTA ';
end;
UniQuery1.Execute(100);
ShowMessage('OK');
DA Dynamic SQL Error
Too many Contexts of Relation/Procedure/Views. Maximum allowed is 255
I always have to specify the type of parameters before filling in the parameters array, as example?
Query1.Params[0].DataType := ftInteger;
I changed the command, find that does not work with update or insert into sql clausa. more noticed a strange thing, the string type parameter so writes the first character in the database.
UniQuery1.Params[1].AsString := 'CARTA '; -> so the letter C recorded in the database, even passing the type parameter to ftstring
erro batch insert firebird
Re: erro batch insert firebird
Thank you for the information. We have reproduced the issue and investigation is in progress. We will inform you when we have any results.
For correct functioning of batch operations, you should set the parameter type before filling in it.
For correct functioning of batch operations, you should set the parameter type before filling in it.
Re: erro batch insert firebird
is there any alternative, must import 30 000 lines of a text file, and tried with cached updates and always give conflicting primary key, not entedir why using UNIQUERY with firebird. game data to query, and when you apply updates, UPDATE ERROR MESSAGE. there is some property of tuniquery I need to mark it? because the ID accusing UNIQUE KEY error, I generate it before playing in uniquery (a sequential banks bank) and to apply, always error not know what else to do.
Re: erro batch insert firebird
Please compose a small sample demonstrating the described behavior and send it to viktorv*devart*com, including scripts creating database objects in order to get a detailed answer.