DelphiFAQ Home Search:

When and why is an EFCreateError exception raised?

 

comments2 comments. Current rating: 5 stars (1 votes). Leave comments and/ or rate it.

Question:

My application throws an EFCreateError exception - what does that mean?

Answer:

The EFCreateError eception is raised when an error occurred during creation of a TFileStream stream (which is the creation of a new file).

Probable reasons: lack of access rights, lack of disk space. See the code below (part of unit Classes.pas where this exception is raised.

constructor TFileStream.Create(const FileName: string; Mode: Word);
begin
//...
    FHandle := FileCreate(FileName);
    if FHandle < 0 then
      raise EFCreateError.CreateResFmt(@SFCreateError, [FileName]);
//...
end;

Comments:

2007-08-05, 16:41:58
anonymous from Singapore  
How do I stop the EFCreateError notice popping up everytime the PC starts up?
2008-03-19, 13:57:49
jgerald2@gmail.com from Brazil  
rating
amigo...por acaso não é windowsXP OU 2000???

se for...eu tive o mesmo problema e resolvi assim:

SOLUÇÃO PARA RODAR NOS SISTEMAS OPERACIONAIS WIN2000 E WIN-XP - ERRO: EXCEÇÃO EFCREATEERROR NO MÓDULO TABELA.EXE EM 000138EB

Isto ocorre devido ao programa não achar a pasta de gravações dos arquivos temporios do quickreport:

O que fazer:

WIN2000/NT

Crie uma pasta chamado TEMP na raiz c:
Agora vá nas propriedades do MEU COMPUTADOR -(ultima opção).
Avançado
Environement Variables
Agora mude os dois caminhos temp e tmp para C:\TEMP
Ok...é só confirmar e Reiniciar o Micro


WINXP

alem de criar a pasta chamada TEMP na raiz c:
Agora vá nas propriedades do MEU COMPUTADOR
avançado
variaveis de ambiente
ai mudei o caminho das variaveis TEMP E TMP para o caminho de minha preferencia no caso C:\TEMP

Espero que tenha ajudado...t+

 

 

Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option.
 
It seems that you are
from Los Angeles, US .

Info/ Feedback on this

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:
photo Add a picture:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity. The owner of this web site reserves the right to delete such material.