Fórum delphi e firebird #52484
25/08/2005
0
Depois que começa a importação, na posição 160 da o seguinte erro:
Dentro do delphi:
Project teste.exe raised exception class edatabaseerror with message
´arithmetic exception, numeric overflow, or string truncation
cannot transliterate character tetween character sets
´.process stopped. use step ou run to continue.
No programa executável:
Project teste.exe raised exception class edatabaseerror with message
´unable to find record. No key specified´. Process stopped.
´.process stopped. use step ou run to continue.
Meu código fonte:
var linha : system.textfile;
qincluir : tSqlquery;
begin
assignfile(linha,´C:\Sistema\Informatica\lista_master.txt´);
reset(linha);
while not eoln(linha) do
begin
readln(linha,leitura);
cod := ´´;
descp := ´´;
valor := ´´;
edit1.Text := ´´;
edit2.Text := ´´;
edit3.Text := ´´;
cod := copy(leitura,6,5);
descp := copy(leitura,14,56);
valor := tiraponto(Alltrim(copy(leitura,72,83)));
edit1.Text := cod;
edit2.Text := descp;
edit3.Text := valor;
if cod = ´36984´ then
showmessage(´aqui vai dar problema´);
with qincluir do
begin
qrAux.Active := false;
qrAux.SQL.Clear;
qrAux.SQL.Text := ´SELECT MAX(codigo)+1 AS ID FROM tblista´; // SELECIONA O MAIOR CÓDIGO E INCREMENTA DE 1
qrAux.Active := TRUE;
IF qrAux.FieldByName(´Id´).AsInteger = 0 THEN
Codi := ´1´
ELSE
Codi := qrAux.FIELDBYNAME(´id´).Asstring;
ClientDataSet1.Insert;
ClientDataSet1codigo.Value := strtoint(codi);
ClientDataSet1codproduto.value := cod;
ClientDataSet1NOME.Value := descp;
ClientDataSet1VALOR.Value := valor;
ClientDataSet1.Post;
end;
ClientDataSet1.ApplyUpdates(-1);
end;
closefile(linha);
ClientDataSet1.Close;
ClientDataSet1.Close;
ClientDataSet1.Open;
Cruel
Curtir tópico
+ 0Posts
25/08/2005
Cruel
Gostei + 0
26/08/2005
Sremulador
1 - Tamanho do campo menor do que requerido.
2 - String no lugar de números.
Gostei + 0
26/08/2005
Gandalf.nho
Duplicidade.
[url]http://forum.clubedelphi.net/viewtopic.php?p=217549[/url]
Para maiores esclarecimentos pode mandar-me uma [url=http://forum.clubedelphi.net/privmsg.php?mode=post&u=8378]Mensagem Particular[/url].
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)