Subj : Help!...EAccessViolation in module Officina.exe. Process Stopped To : borland.public.cpp.borlandcpp From : Alessandro Date : Tue Feb 22 2005 08:38 pm Hello! sorry for my english...:-)... i have this problem... i have a program with this structure... struct Cell{ struct date Data; AnsiString marca; AnsiString tipo; int N_progressivo; AnsiString difetto; AnsiString diagnosi; AnsiString modifiche_costruttore; AnsiString N_serie_ricambi; AnsiString Risoluzione; AnsiString targa; } ; the objective of my project it's read a file that contains a vector (in array) of structure. I have this routine that write a new structure in a file... ...... New.diagnosi= Diagnosi->Text; //Inserisco i Campi New.marca= Marca->Text; .... if (PresentFile()== 0){ CreateDatabase(); Write( New ); //in qualche modo crea il file } else { Write( New ); } //------------------------------------------------------------ int PresentFile(){ FILE *pf; if((pf = fopen("database.dtb","r"))==NULL){ fclose(pf); return 0; } else { fclose(pf); return 1; } //------------------------------------------------------------ } void CreateDatabase(){ FILE *cd; if ((cd==fopen("database.dtb","w"))==NULL){ //Creazione DB Impossibile... } else { } fclose(cd); } //------------------------------------------------------------- void Write(struct Cell C){ FILE *fw; fw= fopen("database.dtb","ab"); fwrite(&C,sizeof(struct Cell),1,fw); fclose(fw); } My problem is when i going to read the created file, with the seguent routine, void DatabaseExtractor(){ int l = 0; struct Cell Temp; struct Cell DB[1000]; FILE *Dex; Dex=fopen("database.dtb","rb"); while(!feof(Dex)){ fseek(Dex,l*sizeof(struct Cell),SEEK_SET); fread(&Temp,sizeof(struct Cell),1,Dex); DB[l]= Temp; // inizialmente Database[i]=temp; l++; } for (int i = 0;iCells[1][i+1]=Database[i].N_progressivo; DBGrid1->Cells[2][i+1]=Database[i].targa; DBGrid1->Cells[3][i+1]=Database[i].marca; DBGrid1->Cells[4][i+1]=Database[i].tipo; DBGrid1->Cells[5][i+1]=Database[i].difetto; DBGrid1->Cells[6][i+1]=Database[i].diagnosi; DBGrid1->Cells[7][i+1]=Database[i].modifiche_costruttore; DBGrid1->Cells[8][i+1]=Database[i].Risoluzione; } } the file haven't error but on Database-Loading (activated by a button) , the program fail with this error, Access Violation at address 0040467E.in module officina.exe.read of address 110107DB. Your Opinion? Thanks, Ale .