Ver Mensaje Individual
  #1  
Antiguo 07-12-2017
Avatar de The Cid James
The Cid James The Cid James is offline
Miembro
NULL
 
Registrado: jun 2013
Posts: 129
Reputación: 11
The Cid James Va por buen camino
Problemas al guardar hash md5

Buenas gentes tengo el siguiente codigo
Código Delphi [-]
procedure Tfconfiguracion.Button1Click(Sender: TObject);
begin
 if edit1.text = edit2.text
  then
    begin
    fmodulo.tempresa.Active := true;
    fmodulo.tempresa.Edit;
    fmodulo.tempresa.Fields.FieldByName ('pas').AsString := CalcHash2(Edit1.Text, haMD5);
    fmodulo.tempresa.Post;
    application.MessageBox(pchar('Contraseña guardada exitosamente'),
    pchar('ERROR'), (MB_OK + MB_ICONINFORMATION))
    end
  else
    application.MessageBox(pchar('Las contraseñas no coinciden, intentte nuevamente'),
    pchar('ERROR'), (MB_OK + MB_ICONINFORMATION))
end;

Cuando quiero hacer el post me sale el siguiente error type mismatch for field expecting widememo actual widestring supongo que es por el tipo de campo en el que estoy guardando (en mi caso varchar (500)) pero he probado con varios y me tira diferentes errores que puede ser?
__________________
We are told to remember the idea, not the man, because a man can fail. He can be caught, he can be killed and forgotten, but 400 years later, an idea can still change the world.
Responder Con Cita