Viktor Szakáts wrote:
My very first problem towards implementing hbmemio
as a replacement for temp tables is that I'd need
to create *unique* "filenames".
BTW the same problem goes to hbnetio, where I sometimes
need to create unique temp files (which later get renamed
to final table name)
How to do that?

In Windows and real file system I use GetTempFileName() WinAPI, but I do not like this way. Some trivial solutions like
 HB_TTOS(HB_DATETIME()) + LTRIM(STR(HB_RANDOM(999999999999), 12, 0))
usually is also acceptable, but it would be nice to have more beautiful way to do that.

Yes, with real FS it's okay with our APIs, but
such date/time/random based solution aren't rock
solid (uniqueness isn't guaranteed), so indeed
something better would be good.

Brgds,
Viktor

_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to