Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 10 of 13 total |
Error in SQL! |
Thu, Dec 27 2007 5:50 AM | Permanent Link |
Roger Oliveira | Hello! Sometimes in the execution of SQL "iINSERT INTO...", error = 'Operation Aborted' what is this error? I amm thinking change DBISam to another bank. Thanks! |
Thu, Dec 27 2007 9:30 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Roger
The error will depend on your sql code so please post the sql where you get this error. It would also be useful to know which version of DBISAM. Roy Lambert |
Thu, Dec 27 2007 9:59 AM | Permanent Link |
"Jose Eduardo Helminsky" | Roger
Why do you think change DBISAM ? It is a solid database engine. BTW, are you from Brazil ? Eduardo |
Thu, Dec 27 2007 10:52 AM | Permanent Link |
Roger Oliveira | PS: When the cursor gives error of delphi is upon: SQLRemoto.ExecSQL; During 20 seconds, then the EVENT: QueryError: "Operation Aborted" PS: THIS ERROR AS ONLY HAPPENS times. ACHO THAT HAS A VIEW WITH "LOCKED" in registry!??!?? CODE BELLOW: // // A cada 5 segundos tenta enviar dados do buffer para o servidor // procedure TfrmMain.TimerTimer(Sender: TObject); var Sucesso: Boolean; QtdeAnt: Integer; begin Timer.Enabled := False; // Se estiver conectado... if Conexao.Active then begin // Evita atropelamento if Enviando then Exit; Enviando := True; // Seta Sucesso como true.. Sucesso := True; // Tenta enviar o que tem no buffer para o servidor // à medida em que os dados são enviados o buffer vai sendo esvaziado TBBuffer.Refresh; TBBuffer.First; QtdeAnt := IntTotalSent; // Se conter registros no buffer, então mostra painel de progresso if TBBuffer.RecordCount > 0 then begin SaveLog('Iniciando sincronização. Registros no buffer: ' + IntToStr(TBBuffer.RecordCount)); // Troca o cursor por cursor de espera Screen.Cursor := crSQLWait; // Mostra painel com a barra de progresso de envio Progresso.Properties.Max := TBBuffer.RecordCount; Progresso.Position := 0; LblProg.Caption := 'Enviando ' + IntToStr(TBBuffer.RecordCount) + ' registros...'; PnlProg.Show; PnlProg.Refresh; while (TBBuffer.RecordCount > 0) and (Sucesso) do begin // Se o código da célula for zero significa que // é um contador então grava na tabela buffers if TBBuffer.FieldByName('ID_CELULA').AsInteger = 0 then begin // Monta a query SQLRemoto.SQL.Clear; SQLRemoto.SQL.Add('INSERT INTO BUFFERS (BUFFER,DATAHORA,TURNO,QTDE) ' + 'VALUES (' + TBBuffer.FieldByName('ID_OPERACAO').AsString + ',' + Rotinas.DthDB(TBBuffer.FieldByName('TERMINO').AsDateTime) + ',' + TBBuffer.FieldByName('TURNO').AsString + ',' + TBBuffer.FieldByName('COMENTARIOS').AsString + ')' ); end else // Não é um contador então gravar na tabela PROCESSADOS begin // Monta a query SQLRemoto.SQL.Clear; SQLRemoto.SQL.Add('INSERT INTO PROCESSADOS (AREA_ID,OPERACAO_ID,INICIO,TERMINO,DURACAO,LIMITE,TRANSPORTE,EXCEDIDO,TURNO)'+ 'VALUES (' + IntToStr(TBBuffer.FieldByName('ID_CELULA').AsInteger) + ',' + IntToStr(TBBuffer.FieldByName('ID_OPERACAO').AsInteger) + ',' + Rotinas.DthDB(TBBuffer.FieldByName('INICIO').AsDateTime) + ',' + Rotinas.DthDB(TBBuffer.FieldByName('TERMINO').AsDateTime) + ',' + IntToStr(TBBuffer.FieldByName('DURACAO').AsInteger) + ',' + IntToStr(TBBuffer.FieldByName('LIMITE').AsInteger) + ',' + IntToStr(TBBuffer.FieldByName('TRANSPORTE').AsInteger) + ',' + IntToStr(TBBuffer.FieldByName('EXCEDIDO').AsInteger) + ',' + IntToStr(TBBuffer.FieldByName('TURNO').AsInteger) + ')' ); end; try SQLRemoto.ExecSQL; // Se o comando acima for bem sucedido, deleta o registro do buffer // e incrementa o número de registros enviados ao servidor TBBuffer.Delete; IntTotalSent := IntTotalSent + 1; Progresso.Position := Progresso.Position + 1; PnlProg.Refresh; except on E: Exception do begin // Se a query acima for mal sucedida então sai do loop SaveLog('Falha de comunicação: ' + E.Message); Sucesso := False; IntTotalFail := IntTotalFail + 1; Conexao.Close; end; end; end; // Salva o log avisando que a sincronização foi bem sucedida SaveLog('Fim do processo de sincronização. ' + IntToStr(IntTotalSent - QtdeAnt) + ' registros enviados.'); end; // Esconde o painel de progresso de envio e diz que não tá mais enviando dados Screen.Cursor := crDefault; PnlProg.Hide; Enviando := False; end; Timer.Enabled := True; end; |
Thu, Dec 27 2007 10:55 AM | Permanent Link |
Roger Oliveira | Yes, Im from brazil. see the topic of Eduardo about FLOATING ERROR in SQL, he work with me. Roger. "Jose Eduardo Helminsky" <contato@hpro.com.br> wrote: Roger Why do you think change DBISAM ? It is a solid database engine. BTW, are you from Brazil ? Eduardo |
Thu, Dec 27 2007 11:30 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Roger
> PS: When the cursor gives error of delphi is upon: > > SQLRemoto.ExecSQL; So its a good guess that this is the one causing the error > During 20 seconds, then the EVENT: QueryError: "Operation Aborted" I'm surprised it takes this long > ACHO THAT HAS A VIEW WITH "LOCKED" in registry!??!?? I think I've lost something here with the translation to English. DBISAM uses a .lck file and as far as I know nothing is put in the registry. > SQLRemoto.SQL.Add('INSERT INTO BUFFERS (BUFFER,DATAHORA,TURNO,QTDE) ' + > 'VALUES (' + TBBuffer.FieldByName('ID_OPERACAO').AsString + ',' > + Rotinas.DthDB(TBBuffer.FieldByName('TERMINO').AsDateTime) + ',' > + TBBuffer.FieldByName('TURNO').AsString + ',' > + TBBuffer.FieldByName('COMENTARIOS').AsString + ')' ); > end > else > // Não é um contador então gravar na tabela PROCESSADOS > begin > > // Monta a query > SQLRemoto.SQL.Clear; > SQLRemoto.SQL.Add('INSERT INTO PROCESSADOS (AREA_ID,OPERACAO_ID,INICIO,TERMINO,DURACAO,LIMITE,TRANSPORTE,EXCEDIDO,TURNO)'+ > 'VALUES (' + IntToStr(TBBuffer.FieldByName('ID_CELULA').AsInteger) + ',' > + IntToStr(TBBuffer.FieldByName('ID_OPERACAO').AsInteger) + ',' > + Rotinas.DthDB(TBBuffer.FieldByName('INICIO').AsDateTime) + ',' > + Rotinas.DthDB(TBBuffer.FieldByName('TERMINO').AsDateTime) + ',' > + IntToStr(TBBuffer.FieldByName('DURACAO').AsInteger) + ',' > + IntToStr(TBBuffer.FieldByName('LIMITE').AsInteger) + ',' > + IntToStr(TBBuffer.FieldByName('TRANSPORTE').AsInteger) + ',' > + IntToStr(TBBuffer.FieldByName('EXCEDIDO').AsInteger) + ',' > + IntToStr(TBBuffer.FieldByName('TURNO').AsInteger) + ')' ); > end; > > try > SQLRemoto.ExecSQL; Its a good guess that your error is here. In the exception block try adding a SQLRemoto.SQL.SaveToFile to capture the actual sql used. My guess is that one of your fields in TBBuffer or Rotinas.DthDB has bad data in it and the ExecSQL is failing because it can't convert it correctly. If you capure it with SaveToFile you can then test it out in DBSys and identify the problem field. If you still can't spot the problem post the sql as saved to file. Roy Lambert |
Thu, Dec 27 2007 2:18 PM | Permanent Link |
Eu | change DBISam to another bank???
Another Financial Institution? DBISam is a bank? this is fantastic. I love this. thanks DBISam, you are the best Roger Oliveira <roger@puxtreme.com.br> wrote: Hello! Sometimes in the execution of SQL "iINSERT INTO...", error = 'Operation Aborted' what is this error? I amm thinking change DBISam to another bank. Thanks! |
Thu, Dec 27 2007 2:18 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Roger,
<< Sometimes in the execution of SQL "iINSERT INTO...", error = 'Operation Aborted' what is this error? >> What version of DBISAM are you using ? And, is your application using a local or remote session with this INSERT statement ? Finally, are you running this in the Delphi IDE ? -- Tim Young Elevate Software www.elevatesoft.com |
Thu, Dec 27 2007 2:23 PM | Permanent Link |
Roger Oliveira | What version of DBISAM are you using ? Version: 4.25 Build 5
And, is your application using a local or remote session with this INSERT statement ? Remote session Finally, are you running this in the Delphi IDE ? No. |
Thu, Dec 27 2007 2:41 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Roger,
<< And, is your application using a local or remote session with this INSERT statement ? Remote session >> What is the RemoteTimeout property set to in the remote TDBISAMSession that you're using ? -- Tim Young Elevate Software www.elevatesoft.com |
Page 1 of 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Wednesday, June 12, 2024 at 01:54 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |