Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extended error 183 DETAILS 3

Status
Not open for further replies.

Spannerman

Programmer
Dec 31, 2000
26
0
0
GB
I have a function to delete a record from a file.The method I am using takes an input code number and finds the record.I substitute the first letter of the surname found with an asterisk and rewrite to the file.I then read the file and write all records without an asterisk to a temporary file.I then use "system" to delete the original file and rename the temp file to the name of the original,thereby having a file without the deleted records.

I run my system on a network at work and the program works perfectly on MY computer.However,in clothing stores ,where they are using my software,when someone tries to delete,they get extended error 183 and when you view the stock database the record they have tried to delete shows up on the screen with an asterisk in the first position.Someone has suggested that error 183 is when when you attempt to create a file which already exists.I have cleaned the system entirely of anything remotely resembling my temporary file but the system still crashes.How come the program can work on one computer and not another????????
 
This may be just another joke of C which it normally plays on us. :-( Check out whether before a call to the system for deletion the file is closed use absolute pathname to delete that and yes it is one of the reasons for the occurance of Extended error 183 that you are trying to create an existing file .........
However it is not the only reason.

Hope things help....
Regards,
SwapSawe.
 
On a Second thought I feel you should also check if you are trying to create a directory from within program to store the temp file. If the directory exists then too it may flash that error.

Regards,
SwapSawe.
 
Again what is the platform? I think Windows or Nt.
I thing you just did not delete your original file
Reason?
You did not close your main file before deleting it or it has "read only" properties for main or tmp file. System can set this by default.

But I think this is a VERY BAD THING TO DO. You can delete file with main data and then for some reason fail to rename tmp file. In this case you will loose your data. I don't thing guys at store will like it. It is nonsense do delete and rewrite whole file just for one record. It is not even because of time (who cares about time in store :) it is just dangerous for data itself. Why don't you use some Database for it or at least create your own simple data base with data and index files.
What stores are using your program? I am not going to use my cards at these stores:)
 
I'm puzzled as to why you need to use system() to delete the file. Why not remove()?

It sounds like the error code you're getting is coming from the OS. "Extended Error 183" definitely has nothing to do with C. You might try asking in a forum that is dedicated to the OS you're getting the error on.



Russ
bobbitts@hotmail.com
 
Many thanks for all your help it DID turn out to be concerned with OS.The network had been purposely set so that the Clothes Stores operators could ot write and delete files for security purposes so my legitimate delete and rename was not allowed.

Thanks Again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top