[firebase-br] Meio Off-Atualizar tabela de Preços - continuação pessoal

Reijanio Nunes Ribeiro rnribeiro em gmail.com
Sáb Dez 8 12:41:12 -03 2007


pessoal estou com o seguinte problema no meu form de atualização de preços
pois nele tenho edits q representam seleção por tabelas, grupos e
fornecedores e se preencho um deles e o resto dos edits deixo em branco da o
seguinte erro: is not valid integer value poderiam me ajudar a sintase é
assim: observação na sintase do update n testei ainda:
procedure TF_reajustepreco.bitbtn3Click(sender: TObject);

if radiobutton2.cheched = true then begin
QryAtualiza.Close;
QryAtualiza.CommandText := 'udate produto set VLRVENDA = VLRVENDA +
((VLRVENDA * :PERCENTUAL)/100)';
QryAtualiza.Params.ParamByName('percentual').AsFloat := StrToFloat(
edtPercentual.Text);
QryAtualiza.Execute;
BitBtn3.Enabled := False;
end;

if RadioGroup1.ItemIndex = 0 the begin
QryAtualiza.Close;
QryAtualiza.CommandText := 'udate produto set VLRVENDA = VLRVENDA +
((VLRVENDA * :PERCENTUAL)/100) WHERE tabela = :ptabela,codgrupo =:pgrupo,
codforn = :pfornecedor';
QryAtualiza.Params.ParamByName('ptabela').AsInteger := StrToInt(edit1.Text);
QryAtualiza.Params.ParamByName('pgrupo').AsInteger := StrToInt(edit2.Text);
QryAtualiza.Params.ParamByName('pfornecedor').AsInteger := StrToInt(
edit3.Text);
QryAtualiza.Params.ParamByName('percentual').AsFloat := StrToFloat(
edtPercentual.Text);
QryAtualiza.Execute;
end
else
QryAtualiza.CommandText := 'udate produto set VLRVENDA = VLRVENDA -
((VLRVENDA * :PERCENTUAL)/100) WHERE tabela = :ptabela,codgrupo =:pgrupo,
codforn = :pfornecedor';
QryAtualiza.Params.ParamByName('ptabela').AsInteger := StrToInt(edit1.Text);
QryAtualiza.Params.ParamByName('pgrupo').AsInteger := StrToInt(edit2.Text);
QryAtualiza.Params.ParamByName('pfornecedor').AsInteger := StrToInt(
edit3.Text);
QryAtualiza.Params.ParamByName('percentual').AsFloat := StrToFloat(
edtPercentual.Text);
QryAtualiza.Execute;
BitBtn3.Enabled := False;
end;

//o erro que retorna é esse
'''is not a valid integer value'

isso acontece pq os edits são pra selecionar ou por tabela fornecedor ou
grupo mais se fica r em branco recebe esse erro acho eu podem me ajudar



Mais detalhes sobre a lista de discussão lista