FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour DBF TEMPORARY
Posts: 1515
Joined: Thu Oct 30, 2008 02:37 PM
Re: DBF TEMPORARY
Posted: Wed Jul 15, 2015 10:36 AM

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

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: DBF TEMPORARY
Posted: Wed Jul 15, 2015 10:56 AM
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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: DBF TEMPORARY
Posted: Wed Jul 15, 2015 06:15 PM
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
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: DBF TEMPORARY
Posted: Wed Jul 15, 2015 06:35 PM

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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: DBF TEMPORARY
Posted: Wed Jul 15, 2015 06:46 PM

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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: DBF TEMPORARY
Posted: Wed Jul 15, 2015 07:39 PM
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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: DBF TEMPORARY
Posted: Wed Jul 15, 2015 10:34 PM

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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: DBF TEMPORARY
Posted: Wed Jul 15, 2015 10:45 PM

Antonio,

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

EMG

Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Re: DBF TEMPORARY
Posted: Thu Jul 16, 2015 11:10 AM

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
Posts: 731
Joined: Fri Oct 07, 2005 07:42 AM
Re: DBF TEMPORARY
Posted: Thu Jul 16, 2015 01:12 PM
Example Code

Code (fw): Select all Collapse
/* 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__)
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: DBF TEMPORARY
Posted: Thu Jul 16, 2015 01:58 PM
Rafa,

Code (fw): Select all Collapse
Error DBFNTX/1004  Create error: mem:test.dbf (DOS Error 123)


EMG
Posts: 731
Joined: Fri Oct 07, 2005 07:42 AM
Re: DBF TEMPORARY
Posted: Thu Jul 16, 2015 03:10 PM
Hi Enrico
I use NTX, and Harbour 3.2 i don't problem.
New code.

Code (fw): Select all Collapse
  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__)
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: DBF TEMPORARY
Posted: Thu Jul 16, 2015 03:37 PM
Rafa,

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


I'm using xHarbour.

EMG
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: DBF TEMPORARY
Posted: Thu Jul 16, 2015 04:04 PM

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

Regards



G. N. Rao.

Hyderabad, India
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: DBF TEMPORARY
Posted: Thu Jul 16, 2015 04:37 PM
nageswaragunupudi wrote:HB_MEMIO and "mem:somename.dbf" is new information for me.
Thanks


+1
Gracias Rafa
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces