Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 10 MAY 2005 05:47:33AM William Ng wrote:

I am writing a program to attach data files from two different directory with atach_tables.i wanted to attach one directory and then detach and attach the seconnd directory but i get the message saying i cant because they have the same volume name.How do u change the volume name in oi?


At 10 MAY 2005 09:02AM Warren Auyong wrote:

Use the NAME_VOLUME subroutine

From the System Monitor you can type:

RUN NAME_VOLUME 'C:\DATAFOLDER', 'MYDATA'

or call it from BASIC+

CALL NAME_VOLUME( "C:\DATAFOLDER", "MYDATA" )


At 10 MAY 2005 11:07PM William Ng wrote:

Hi, thanks for reponding.

I have tried the NAME_VOLUME, however it doesn't work on an Database that has Indexed Tables.So it would be quiet troublesome to remove and recreate the indexes again every time.

Basically, I have duplicated databases with same volume name and database ID, but with different data. My main intention is to attach and detach a few of the tables programmatically from these databases in order to retrieve data. In details, I would just need to attach table X from first database, then detach this table and attach table x from second database.

However, the error message i get is:

FS404: The "C:\DATA2" volume has the same label ("DATA1") as the "RTP57*C:\DATA1" volume and cannot be attached.

It seems like the Detach_Table is only temporary detach table from the database. Is there anyway that i can PERMANENTLY detach a table, or flush system memory in order to allow another table with same volume and database id to be attach.I know this can be done with AREV the dos version.We always attach and detach as well as set files.

Thank you for your Help.


At 10 MAY 2005 11:36PM Warren Auyong wrote:

Well you could always attach the revmedia file and edit the volumename manually in the REVMEDIA record. Instructions on attaching the revmedia file are available in the knowledge base articles on adding mfses or manually removing indexes from a file. I don't know what impact this will have on indexing though.

I believe Dave Harmacek or somebody has a utility for renaming volumes with indexed files.

As for permanently detaching a file, just remove it from the attached files list in the Database Manager and update the DBT. The next time you log in the file will not be attached until you do so explicitly in a program.


At 11 MAY 2005 07:45AM Richard Guise wrote:

There is a utility RENAME_VOLUME which renames the volume and/or changes the accounts of the files in the volume. It sorts out all the volume references in the indexing. Source code is provided and I have tweaked it slightly for one or two reasons (e.g. the dear old "dependent indexing" facility).

From notes in the source code it originated from Winwin and may be lurking in your SYSPROCS or otherwise easily available.

It's a mighty useful utility!


At 12 MAY 2005 12:27PM Dave Harmacek wrote:

That rename volume utility was not by me, and is for ARev, anyway.

William, it is NEVER a good idea to copy an entire directory of linear hash files outside of OpenInsight or Advanced Revelation. You should always use the COPYTABLE routines, then add indexing to the new volume.

The "volume name" must be unique between directories. The indexing systems depends upon this fact. It used to be important for valid locking for the DOS Filenames to be unique between directories. With the newer server-based Network Products that may not be as important as in the past.

I strongly suggest you attach the copied directory, remove all indexes, make a new directory for the copied directory, and then use COPYTABLE.

Dave Harmacek

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/e41b33b553a24dd985256ffd0035caf4.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1