Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 19 NOV 2003 04:46:21PM Gerald Lovel wrote:

I execute the statements:

Detach_Volume( Volname )
Attach_Table( Volname, "", "" )

after which @VOLUMES shows Volname in the list of volumes, but the list of files in @VOLUMES(3) is blank for Volname. Shouldn't Attach_Table update the list of tables attached in the volume?

I loop through @TABLES, extracting the names of all primary tables which belong to Volname. Then I copy the tables to a new volume:

DirPath=E:\TEST"
For Cnt=1 To End.Cnt
  File_Key=Tables_List
  Account=Xlate( SysTables_File$, File_Key, Tab_Account$, "X" )
  Set_Status(0)
  Copy_Table( File_Key, DirPath, Account, File_Key, 0, 0, 0, 0 )
  Status=Get_Status( Error )
  If Status Then DEBUG
Next

Hmm. When the source volume is detached and then attached before the copy, indexed tables are not copied. Usual error is SYS1301. Does the search function in this forum accept "SYS1301"? Hmm. Searching for Copy_Table showed similar perplexions over the years, without any clear resolutions. Maybe the information on @VOLUMES is a clue to what is going on. Other ideas?

Gerald


At 19 NOV 2003 06:08PM Oystein Reigem wrote:

Gerald,

…, but the list of files in @VOLUMES(3) is blank for Volname

I remember seeing something similar earlier this year. I haven't ever used @VOLUMES much, but that time I inspected this system variable with the Debugger and saw the @VOLUMES(n) elements that I didn't know about, and noticed how patchily they seemed to be filled in with values. Unfortunately I can't find any notes about it. It would be typical of me to make a note of it. Maybe I found out what was wrong. Maybe it was something so trivial I didn't bother to make a note - like having to call Define_Database after detaching and attaching???

(I might just also have given up @VOLUMES and got the info from somewhere else, like the SYSVOLUMES and SYSTABLES tables or something. And not bothered with making a note.)

Sorry for not having something more substantial to tell you.

- Oystein -


At 26 NOV 2003 03:56PM Gerald Lovel wrote:

Oystein,

Actually, calling Define_Database after attaching is really a problem. If the tablenames are not filled in @Volumes, then Define_Database detaches the unreferenced tables. For example, suppose you have a volume called "ATLAS". Executing the statements

Define_Database( "TEST" )

Detach_Table( "ATLAS" )

Attach_Table( "ATLAS", "", "" )

Swap_Database( "TEST" )

should return @Volumes and @Tables to where you started from. However, I am seeing that

Detach_Table( "ATLAS" )

Attach_Table( "ATLAS", "", "" )

Define_Database( "TEST" )

Swap_Database( "TEST" )

detaches all tables in ATLAS because tables not listed in @Volumes are not included in the .DBT image.

(Or at least, I think this was what I experienced. Right now, I am faint with hunger and anticipation and so I haven't a clue what happened 2 days ago. I know you don't have Turkeys, but maybe there is a fish you could enjoy.)

Happy Thanksgiving

Gerald

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/a94e47a8f49b4dc185256de3007799a6.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1