Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 16-08-2011
Paulao Paulao is offline
Miembro
 
Registrado: sep 2003
Ubicación: Rua D 31 Casa 1 - Inhoaíba - Rio de Janeiro - RJ - Brasil
Posts: 637
Poder: 21
Paulao Va por buen camino
Error de conversion

<e lo da error de conversion pero no hay nada.

Código Delphi [-]
Conversion failed when converting datetime from character string
Código Delphi [-]
DM.qryAtualiza.Sql.Clear;
  if (rgBanco.ItemIndex = 1) and (edtQtde.Text <> '') then
    DM.qryAtualiza.Sql.Add('select top ' + edtQtde.Text + ' numero_conhecimento,data_emissao_conhecimento,filial_origem ' +
                           ' from conhecimento_carga where data_emissao_conhecimento = ''1899-12-30 00:00:00.000''');
  DM.qryAtualiza.Open;
  sql := Memo1.Lines.Text;
  Gauge1.Visible := True;
  gauge1.MinValue := 0;
  gauge1.MaxValue := DM.qryAtualiza.RecordCount;
  //pb.Max := DM.qryAtualiza.RecordCount;
  //pb.Position := 0;
  DM.qryAtualiza.First;
  while not DM.qryAtualiza.Eof do
  begin
    try
      //DM.Conn.BeginTrans;
      Application.ProcessMessages;
      qry.SQL.add(sql);
      qry.Parameters.ParamByName('Filial').Value  := DM.qryAtualiza.FieldByName('filial_origem').AsString;
      qry.Parameters.ParamByName('Numero').Value  := DM.qryAtualiza.FieldByName('numero_conhecimento').AsString;
      qry.Parameters.ParamByName('Emissao').Value := DM.qryAtualiza.FieldByName('data_emissao_conhecimento').AsDateTime;
      qry.ExecSQL;

esta es mi query de actualizacion

Código Delphi [-]
UPDATE

CONHECIMENTO_CARGA

SET

DATA_EMISSAO_CONHECIMENTO = COALESCE(

(SELECT DISTINCT

OPERACOES_DATA.DATA FROM OPERACOES_DATA

WHERE

OPERACOES_DATA.CONTRATO = 

CONHECIMENTO_CARGA.NUMERO_CONHECIMENTO AND

OPERACOES_DATA.COD_CREDENCIADA = 

CONHECIMENTO_CARGA.FILIAL_ORIGEM AND

OPERACOES_DATA.DATA = 

CONHECIMENTO_CARGA.DATA_EMISSAO_REAL), 

DATA_EMISSAO_CONHECIMENTO )

WHERE

DATA_EMISSAO_CONHECIMENTO = '1899-12-30 

00:00:00.000' AND

FILIAL_ORIGEM = :FILIAL AND

NUMERO_CONHECIMENTO = :NUMERO AND

DATA_EMISSAO_CONHECIMENTO = :EMISSAO
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Error de conversion aams01 C++ Builder 4 27-06-2011 23:45:10
Error en type conversion che SQL 4 14-10-2008 22:52:14
Error de conversion de valor Petolansa Varios 3 05-12-2007 15:03:54
Error de conversion de tipos cacu OOP 0 28-11-2007 06:36:36
Error de Conversion..... chileno OOP 7 06-01-2007 01:03:28


La franja horaria es GMT +2. Ahora son las 12:48:58.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi