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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Operation Not Available - Delphi 5 1

Status
Not open for further replies.

RichardWakeman

Programmer
Apr 14, 2005
3
US
Hi - I have a Delphi 5 app that transfers data from some dbf files into a MS Access app. It works fine and has for a while. However, lately, I am getting the error: OPERATION NOT AVAILABLE. This occurs during a loop of processing a large number of records, and it seems to come up on one particular record and after nearly 21,000 other records have been processed.

I've examined the record it gets stuck on and can see nothing out of the ordinary. My question is just what exactly does this error message mean and/or refer to and what can I do about it?

I have some simple indexes set and no filters or querys. The only complex thing about the app is that it us using both dbase and msaccess drivers in the BDE.

Thanks!

Richard W.
 
I think I've seen this 'Operation Not Available' message when the database engine basically runs out of steam ....
If the record is visibly the same as the others (and there's no duff data, i.e. invalid dates, decimals or NULLs) and there are a vast number of records this could well be the cause.
If you're not already doing so I'd suggest setting up a 'Session.PrivateDirectory' to contain the query files that are generated when database access / work is carried out.
I hope that this helps .....
Steve
 
Thanks Steve for your reply. Some grim possibilities.

Forgive my ignorance but can you further explain:

"...setting up a 'Session.PrivateDirectory' to contain the query files that are generated when database access / work is carried out."

What does that mean? How and where do I do that? And, as I said, I'm not using any queries - should I?

Thanks again!

RichardW.
 
How are you transferring the table data ?

The 'Session.PrivateDirectory' can be made use of on application start-up.
This basically sets up a directory where temp files are created / used (if memory serves me right!)

From the Delphi help files :

"Specifies the directory in which to store temporary table processing files generated by the Borland Database Engine (BDE) for database components associated with a session.

property PrivateDir: String;

Description

Use PrivateDir to set the directory in which to store temporary table processing files for all database connections, such as those generated by the BDE to handle local SQL statements. Ordinarily this value is only set at runtime, so that a user’s local hard disk is used to store temporary files. Local storage of these files improves performance. If no value is specified for PrivateDir, the BDE automatically stores temporary files in the directory current at the time the BDE was initialized.

Note: For applications that run directly from a networked file server, the application should set PrivateDir to a user’s local drive to improve performance and to prevent temporary files from being created on the server where they might conflict with temporary files created by other instances of the application."

Maybe this is worth looking at to see if it eliminates your issue ?
Fingers crossed.

Steve
 
Thanks again for the information.

I'm transferring the data simply - record by record, field by field. Start a loop, start at top of DBF table, Append blank in MSAccess Table, and write data from DBF to Access field by field, then skip to next record in DBF table and do it again. It gets a bit complex depending on what data is what, and some IF THENs, like if DBF->FieldData = such and such, then put into MSAccess->Field such and such.

That's about it.

There is no networking involved, except the DBF data is transferred to the MSAccess machine one PC to the Other via the network - but that is before the transfer Delphi program is even begun. So all the files are already on the local Hard Drive and no remote server is involved.

Not sure how or why I could use a Temp Directory for temp files. What temp files?

Could the problem be related to the version of the BDE? Would updating the BDE be something to try? If so, is there one for the BDE that comes with Delphi 5 Professional?

Thanks


Richard W.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top