Page 3 of 4

Re: DBF TEMPORARY

Posted: Wed Jul 15, 2015 10:36 am
by hmpaquito
Antonino,

IMHO, from clipper's times, to use constant number area is a bad practice.

You can to use select() function

Examp.

cAlias:= cGetNewAlias()
hb_DbCreateTemp(cAlias, aStruct)

nArea:= Select(cAlias)


MsgInfo((nArea)-> (Str(LastRec())), alias(nArea))

Regards

Re: DBF TEMPORARY

Posted: Wed Jul 15, 2015 10:56 am
by Enrico Maria Giordano
James,
James Bott wrote:I am running it successfully with xHarbour (ver 1.2.3). I believe this is the latest version and it is from 2013.
The latest version of xHarour is from three days ago not from 2013.

EMG

Re: DBF TEMPORARY

Posted: Wed Jul 15, 2015 6:15 pm
by James Bott
Enrico,
The latest version of xHarbour is from three days ago not from 2013.
Thanks for the correction.

I am using the version of xHarbour that came with the latest version of FWH (15.5). I assumed it was the latest stable version that was released.

James

Re: DBF TEMPORARY

Posted: Wed Jul 15, 2015 6:35 pm
by James Bott
Enrico,

OK, my mistake again. Apparently I either didn't download the newer xHarbour when I got FWH 15.5, or I forgot to install it. The version of xHarbour that is on the FIVEWIN download site right now is from Nov 2014. I downloaded it and when I installed it I found that there is only one file in the /bin directory--harbour.exe. The old version had 15 EXEs. Strange.

James

Re: DBF TEMPORARY

Posted: Wed Jul 15, 2015 6:46 pm
by James Bott
I re-ran the test using xHarbour 1.2.3 Intl. (SimpLex) (Build 20141106) and I still am only showing one item in the log file after clicking one radio button.

James

Re: DBF TEMPORARY

Posted: Wed Jul 15, 2015 7:39 pm
by Enrico Maria Giordano
James,
James Bott wrote:I downloaded it and when I installed it I found that there is only one file in the /bin directory--harbour.exe. The old version had 15 EXEs. Strange.
Can you show me the list of those EXEs?

EMG

Re: DBF TEMPORARY

Posted: Wed Jul 15, 2015 10:34 pm
by James Bott
Enrico,

Here you are:

List of files in xHarbour\bin
for xHarbour 1.2.3 Intl. (Simplex) (Build 20130326)

Volume in drive C is Windows
Volume Serial Number is 6066-2969

Directory of c:\xHarbour\bin

07/15/2015 03:30 PM <DIR> .
07/15/2015 03:30 PM <DIR> ..
05/12/2013 04:56 PM 737,280 harbour.exe
05/12/2013 04:56 PM 1,071,616 hbdict.exe
05/12/2013 04:56 PM 2,216,448 hbdoc.exe
05/12/2013 04:56 PM 919,552 hbextern.exe
05/12/2013 04:56 PM 961,024 hbformat.exe
05/12/2013 04:56 PM 130,048 hblib.exe
05/12/2013 04:56 PM 1,149,440 hbmake.exe
05/12/2013 04:56 PM 232,960 hbpp.exe
05/12/2013 04:56 PM 129,024 hbrc.exe
05/12/2013 04:56 PM 121,856 hbrm.exe
05/12/2013 04:56 PM 1,602,048 hbrun.exe
05/12/2013 04:56 PM 1,659,904 hbrunmt.exe
05/12/2013 04:56 PM 1,224,704 hbtest.exe
05/12/2013 04:56 PM 1,282,560 hbtestmt.exe
05/12/2013 04:56 PM 1,901,568 xbscript.exe
15 File(s) 15,340,032 bytes

Re: DBF TEMPORARY

Posted: Wed Jul 15, 2015 10:45 pm
by Enrico Maria Giordano
Antonio,

can you update the xHarbour version? The current one is too old.

EMG

Re: DBF TEMPORARY

Posted: Thu Jul 16, 2015 11:10 am
by vilian
Friends,

This function create temporary files in memory or in local directory temporary files(Eg: c:windows\temp) ?

Re: DBF TEMPORARY

Posted: Thu Jul 16, 2015 1:12 pm
by thefull
Example Code

Code: Select all

/* Create file dbf and ntx/ in memory */
function test_memio()
    dbcreate( "mem:test.dbf", { { "F1", "N", 10, 0 }, { "F2", "N", 10, 0 } } )
   use "mem:test.dbf" alias memtest
   index on field->f2 to "mem:tmp1.ntx" DESCENDING

   for i := 1 to 100000
     append blank
     memtest->f1 := i
     memtest->f2 := i * 100
   next
   go top

   browse()
   dbDrop( "mem:test.dbf" )  /* Free memory resource */
   dbDrop( "mem:tmp1.ntx" )  /* Free memory resource */

return nil

Re: DBF TEMPORARY

Posted: Thu Jul 16, 2015 1:58 pm
by Enrico Maria Giordano
Rafa,

Code: Select all

Error DBFNTX/1004  Create error: mem:test.dbf (DOS Error 123)
EMG

Re: DBF TEMPORARY

Posted: Thu Jul 16, 2015 3:10 pm
by thefull
Hi Enrico
I use NTX, and Harbour 3.2 i don't problem.
New code.

Code: Select all

  REQUEST DBFNTX
  REQUEST HB_MEMIO

  function Main()
          rddsetdefault( 'DBFNTX' )   // RDD NTX
         test_memio()
  return nil

    /* Create file dbf and ntx/ in memory */
    function test_memio()
        dbcreate( "mem:test.dbf", { { "F1", "N", 10, 0 }, { "F2", "N", 10, 0 } } )
       use "mem:test.dbf" alias memtest
       index on field->f2 to "mem:tmp1.ntx" DESCENDING

       for i := 1 to 100000
         append blank
         memtest->f1 := i
         memtest->f2 := i * 100
       next
       go top

       browse()
       dbDrop( "mem:test.dbf" )  /* Free memory resource */
       dbDrop( "mem:tmp1.ntx" )  /* Free memory resource */

    return nil
 

Re: DBF TEMPORARY

Posted: Thu Jul 16, 2015 3:37 pm
by Enrico Maria Giordano
Rafa,
thefull wrote:I use NTX, and Harbour 3.2 i don't problem.
I'm using xHarbour.

EMG

Re: DBF TEMPORARY

Posted: Thu Jul 16, 2015 4:04 pm
by nageswaragunupudi
HB_MEMIO and "mem:somename.dbf" is new information for me.
Thanks

Re: DBF TEMPORARY

Posted: Thu Jul 16, 2015 4:37 pm
by cnavarro
nageswaragunupudi wrote:HB_MEMIO and "mem:somename.dbf" is new information for me.
Thanks
+1
Gracias Rafa