DBF TEMPORARY

hmpaquito
Posts: 1200
Joined: Thu Oct 30, 2008 2:37 pm

Re: DBF TEMPORARY

Post 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
Last edited by hmpaquito on Wed Jul 15, 2015 11:00 am, edited 1 time in total.
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: DBF TEMPORARY

Post 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
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: DBF TEMPORARY

Post 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
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: DBF TEMPORARY

Post 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
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: DBF TEMPORARY

Post 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
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: DBF TEMPORARY

Post 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
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: DBF TEMPORARY

Post 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
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: DBF TEMPORARY

Post by Enrico Maria Giordano »

Antonio,

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

EMG
User avatar
vilian
Posts: 795
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil
Contact:

Re: DBF TEMPORARY

Post by vilian »

Friends,

This function create temporary files in memory or in local directory temporary files(Eg: c:windows\temp) ?
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
thefull
Posts: 720
Joined: Fri Oct 07, 2005 7:42 am
Location: Barcelona
Contact:

Re: DBF TEMPORARY

Post 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
Saludos
Rafa Carmona ( rafa.thefullARROBAgmail.com___quitalineas__)
User avatar
thefull
Posts: 720
Joined: Fri Oct 07, 2005 7:42 am
Location: Barcelona
Contact:

Re: DBF TEMPORARY

Post 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
 
Saludos
Rafa Carmona ( rafa.thefullARROBAgmail.com___quitalineas__)
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: DBF TEMPORARY

Post by Enrico Maria Giordano »

Rafa,
thefull wrote:I use NTX, and Harbour 3.2 i don't problem.
I'm using xHarbour.

EMG
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: DBF TEMPORARY

Post by nageswaragunupudi »

HB_MEMIO and "mem:somename.dbf" is new information for me.
Thanks
Regards

G. N. Rao.
Hyderabad, India
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: DBF TEMPORARY

Post by cnavarro »

nageswaragunupudi wrote:HB_MEMIO and "mem:somename.dbf" is new information for me.
Thanks
+1
Gracias Rafa
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
Post Reply