Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2005 Nov : MAPI - BDE Float conversion attempt failed

www.cryer.info
Managed Newsgroup Archive

MAPI - BDE Float conversion attempt failed

Subject:MAPI - BDE Float conversion attempt failed
Posted by:"SDN" (kaster..@kredit.nl)
Date:Fri, 11 Nov 2005 10:58:10 +0100

Hello,

I have a problem with BDE after a Mapi connection. My testcode looks
something like this. I've also tried to restore the 8087 control word with
Get8087CW and Set8087CW but this has no effect.

procedure TestCode;
var
  c             :currency;
  qryTemp :TQuery
begin
  // Mapi logon and Mapi logoff.. Nothing more nothing less
  SendEmail;
  // Does'nt matter if e-mail is send or not. Mapi connection is enough to
cause error

  with qryTemp do
  begin
     DatabaseName := sDatabaseName;
     Close;
     SQL.Clear;
     SQL.Clear;
     SQL.Add('SELECT FloatField FROM Table WHERE FloatField = :Value ');
     C:=0;
     Params.ParamByName('Value').AsFloat := c;
     Open; // OK
     Close;
     C:=3;
     Params.ParamByName('Value').AsFloat := c;
     Open; // OK
     Close;
     C:=3.3;
     Params.ParamByName('Value').AsFloat := c;
     Open; // ERROR
  end;
end;

ERROR = General SQL error. float conversion attempt failed, the source is
invalid.

The error is caused by the BDE. No query is send to MSSQLServer.

Can anyone help me with this error. The only solution is to restart the
application.

Regards

Michel van Kasteren

Info

Glossary

Replies:

www.cryer.info
Managed Newsgroup Archive