Hi,

Support for ZEROSPACE in WorkSpaceList() is trivial but can be implemented only in C. I can add it in necessary. BTW please check above two example with xbase++.


Would you please implement the WorkSpaceList() with ZEROSPACE  ...
I need to obtain all alias within ZEROSPACE ....

Or any way to get a list of all alias within the ZeroSpace ???

I have a related question/problem. Let's say I want to transfer areas among threads (that's the purpose of alias detaching). I'm missing two functions:
1) to attach alias within another thread using a different alias name;
2) to search a "zerospace" for a specific area having some dbf file, some open mode, index, etc.

These missing functionality could be reached by function which renames current alias. F.e.:

  USE items NEW ORDER number READONLY ALIAS items1
  ....
  HB_DBSETALIAS("items_number_RO")
  HB_DBDETACH()

Another thread:
  HB_DBREQUEST("items_number_RO",,, .T.)
  HB_DBSETALIAS("items_ro")
  ...

This could be a waste dynsym table if I want add a random HTTP session number to a database name before detaching it (let's say I want to cache opened tables for HTTP session). It this case I find a useful solution to store a required (for reattaching) data in cargo field. F.e.:

  USE items NEW ORDER number READONLY ALIAS items1
  ....
  HB_DBDETACH(, "items_" + cSession)

Another thread:
HB_DBREQUEST({|alias,cargo| IIF(cargo == "items_" + cSession, (alias := "items_ro", .T.), .F.)},,, .T.)
  ...
/* Here block is a kind of search block. It also assigns a new alias name */

The second proposed solution is more flexible, but is not optimal because it keeps a long mutex lock on "zerospace" internals.


Regards,
Mindaugas
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to