DBF TEMPORARY

Re: DBF TEMPORARY

Postby hmpaquito » 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
Last edited by hmpaquito on Wed Jul 15, 2015 11:00 am, edited 1 time in total.
hmpaquito
 
Posts: 1482
Joined: Thu Oct 30, 2008 2:37 pm

Re: DBF TEMPORARY

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

Re: DBF TEMPORARY

Postby James Bott » Wed Jul 15, 2015 6: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: DBF TEMPORARY

Postby James Bott » Wed Jul 15, 2015 6: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: DBF TEMPORARY

Postby James Bott » Wed Jul 15, 2015 6: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: DBF TEMPORARY

Postby Enrico Maria Giordano » Wed Jul 15, 2015 7: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
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: DBF TEMPORARY

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

Re: DBF TEMPORARY

Postby Enrico Maria Giordano » Wed Jul 15, 2015 10:45 pm

Antonio,

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: DBF TEMPORARY

Postby vilian » 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
User avatar
vilian
 
Posts: 977
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: DBF TEMPORARY

Postby thefull » Thu Jul 16, 2015 1:12 pm

Example Code

Code: Select all  Expand view
/* 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: 731
Joined: Fri Oct 07, 2005 7:42 am
Location: Barcelona

Re: DBF TEMPORARY

Postby Enrico Maria Giordano » Thu Jul 16, 2015 1:58 pm

Rafa,

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


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: DBF TEMPORARY

Postby thefull » Thu Jul 16, 2015 3:10 pm

Hi Enrico
I use NTX, and Harbour 3.2 i don't problem.
New code.

Code: Select all  Expand view

  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
thefull
 
Posts: 731
Joined: Fri Oct 07, 2005 7:42 am
Location: Barcelona

Re: DBF TEMPORARY

Postby Enrico Maria Giordano » Thu Jul 16, 2015 3:37 pm

Rafa,

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


I'm using xHarbour.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: DBF TEMPORARY

Postby nageswaragunupudi » Thu Jul 16, 2015 4:04 pm

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

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10641
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: DBF TEMPORARY

Postby cnavarro » Thu Jul 16, 2015 4: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
User avatar
cnavarro
 
Posts: 6548
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 26 guests