ApplyUpdates
30/03/2006
0
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
Posts
30/03/2006
Paullsoftware
[b:a65e95e56d]CommitRetaining ou Commit[/b:a65e95e56d] :wink:
31/03/2006
Emerson Nascimento
ShowMessage(E.Message);
e veja no momento do ApplyUpdates não é retornado algum erro.
31/03/2006
Araujojunior
---------------------------
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
Clique aqui para fazer login e interagir na Comunidade :)