ApplyUpdates

30/03/2006

0

Estou tentando fazer o seguinte procedimento. soh q quando saio e entro novamente no aplicativo ele ainda esta com o mesmo valor.

procedure TEntrada_Caixa.SpeedButton5Click(Sender: TObject);
var
nr_cheque:String;
begin
nr_cheque := InputBox(´Cheque Entrada...´,´Valor do Cheque:´,´´);
if nr_cheque <> ´´ Then
begin
cdsCaixa.Edit;
cdsCaixanr_cheque.AsFloat := StrToFloat(nr_cheque);
cdsCaixa.Post;
cdsCaixa.ApplyUpdates;
end;
end;

Esse cdsCaixa eh um ClientDataSet ligado ao DataSetProvider e por fim ao SqlQuery do Dbexpress, no delphi 2005 e mysql 4.0.

Valeu,

Junior


Araujojunior

Araujojunior

Responder

Posts

30/03/2006

Paullsoftware

posso até ta falando besteira, mais no IB eu faço:
[b:a65e95e56d]CommitRetaining ou Commit[/b:a65e95e56d] :wink:


Responder

31/03/2006

Araujojunior

Infelizmente nao deu certo :( mais alguma ideia


Responder

31/03/2006

Emerson Nascimento

no evento OnReconcileError, ponha a seguinte linha:

ShowMessage(E.Message);

e veja no momento do ApplyUpdates não é retornado algum erro.


Responder

31/03/2006

Araujojunior

Esse eh o erro:

---------------------------
Caixa
---------------------------
´0.0´ is not a valid timestamp
---------------------------
OK
---------------------------

Meus Campos:

object cdsCaixacd_caixa: TIntegerField
FieldName = ´cd_caixa´
Required = True
end
object cdsCaixadt_data: TDateField
FieldName = ´dt_data´
Required = True
end
object cdsCaixacd_cidade: TIntegerField
FieldName = ´cd_cidade´
Required = True
end
object cdsCaixafl_aberto: TIntegerField
FieldName = ´fl_aberto´
Required = True
end
object cdsCaixanr_deposito: TBCDField
FieldName = ´nr_deposito´
Required = True
currency = True
Precision = 12
Size = 2
end
object cdsCaixanr_cheque: TBCDField
FieldName = ´nr_cheque´
Required = True
currency = True
Precision = 12
Size = 2
end
object cdsCaixanr_inicial: TBCDField
FieldName = ´nr_inicial´
Required = True
currency = True
Precision = 12
Size = 2
end
object cdsCaixadt_datareal: TDateField
FieldName = ´dt_datareal´
Required = True
end
object cdsCaixacd_fechamento: TIntegerField
FieldName = ´cd_fechamento´
Required = True
end
object cdsCaixanm_cidade: TStringField
FieldKind = fkLookup
FieldName = ´nm_cidade´
LookupDataSet = Modulo_Dados.cdsCidade
LookupKeyFields = ´cd_cidade´
LookupResultField = ´nm_cidade´
KeyFields = ´cd_cidade´
Size = 40
Lookup = True
end
object cdsCaixanr_saldo: TFloatField
FieldKind = fkCalculated
FieldName = ´nr_saldo´
Calculated = True
end


Responder

Assista grátis a nossa aula inaugural

Assitir aula

Saiba por que programar é uma questão de
sobrevivência e como aprender sem riscos

Assistir agora

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar