DBF in RAM

460 views
Skip to first unread message

Giovanni Di Maria

unread,
Dec 19, 2015, 3:57:02 AM12/19/15
to Harbour Users
Hi All.
Excuse my question.

Is it possible to create and manage a DBF in MEMORY RAM?
The DBF does not exist on disk, but only on RAM.

Thank you very much.

Giovanni Di Maria



Marek Horodyski

unread,
Dec 19, 2015, 4:00:40 AM12/19/15
to harbou...@googlegroups.com



Od: "Giovanni Di Maria" <giovanni...@gmail.com>
Do: "Harbour Users" <harbou...@googlegroups.com>;
Wysłane: 9:57 Sobota 2015-12-19
Temat: [harbour-users] DBF in RAM


Hi All.
Excuse my question.

Is it possible to create and manage a DBF in MEMORY RAM?
The DBF does not exist on disk, but only on RAM.

Hi,

see HBMEMIO in contrib.

Regards,

Marek Horodyski

Giovanni Di Maria

unread,
Dec 19, 2015, 8:10:38 AM12/19/15
to Harbour Users




Thank You Marek.
Giovanni
 

Qatan

unread,
Dec 19, 2015, 3:54:47 PM12/19/15
to harbou...@googlegroups.com
Hi,
 
* see HBMEMIO in contrib.
 
That’s an amazing feature in Harbour...
 
Qatan
 

Zoran Sibinovic

unread,
Dec 19, 2015, 4:20:50 PM12/19/15
to Harbour Users
Hi,

Seems very useful instead of create temp databases in hb_tempdir() but,
does someone knows if there are some limitation about its size or else? 

Regards
Zoran 

Robert Cordaiy

unread,
Dec 19, 2015, 7:35:43 PM12/19/15
to harbou...@googlegroups.com
Can anyone help. I can read in a CSV file to Excel but am unable to find the method to save the CSV (text) file as a .xls.
The SaveAs method doesn't seem to work.
Rob.

--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Klas Engwall

unread,
Dec 19, 2015, 8:18:49 PM12/19/15
to harbou...@googlegroups.com
Hi Rob,

> Can anyone help. I can read in a CSV file to Excel but am unable to find
> the method to save the CSV (text) file as a .xls.
> The SaveAs method doesn't seem to work.
> Rob.

Did you specify the file format?

Does this help? http://www.rondebruin.nl/win/s5/win001.htm

BTW, please start a new thread when your subject is different

Regards,
Klas

Giovanni Di Maria

unread,
Dec 20, 2015, 3:33:30 AM12/20/15
to Harbour Users

Ok. Thank you to ALL
This feature is FANTASTIC !!!!!!
Here is my experiment.
Thank you.
Giovanni Di Maria

#require "hbmemio"
REQUEST HB_MEMIO
procedure main()
   dbCreate( "mem:test", {{ "Name"    ,  "C"  , 25 , 0 },{ "Surname"    ,  "C"  , 25 , 0 }} )
   use mem:test
   browse()
   use
   dbDrop( "mem:test" )  /* Free memory resource */



Qatan

unread,
Dec 20, 2015, 5:21:38 AM12/20/15
to harbou...@googlegroups.com
 
Hi Zoran,
 
* does someone knows if there are some limitation about its size or else?
 
AFAIK it is only limited to the available memory... that’s all.
Great feature in Harbour, isn’t it?
 
Qatan
 

Rolaci

unread,
Dec 20, 2015, 10:52:52 AM12/20/15
to Harbour Users
Hi Giovanni, in the old "dos" days there was little tsr apps that creates "ramdisks", with all the attribs of a disk, i think that we can do de same today, a little search shows this:

http://ubuntuguide.net/ubuntu-using-ramdisk-for-better-performance-and-fast-response

http://www.tekrevue.com/tip/create-10-gbs-ram-disk-windows/

Regards.
Roberto.

Marek Horodyski

unread,
Dec 20, 2015, 11:08:02 AM12/20/15
to harbou...@googlegroups.com

Od: "Robert Cordaiy" <robert....@gmail.com>
Do: "harbou...@googlegroups.com" <harbou...@googlegroups.com>;
Wysłane: 1:35 Niedziela 2015-12-20
Temat: Re: [harbour-users] DBF in RAM

Can anyone help. I can read in a CSV file to Excel but am unable to find the method to save the CSV (text) file as a .xls.
The SaveAs method doesn't seem to work.
Rob.

oExcel:WorkBooks:Add()
oAS   := oExcel:ActiveSheet()
oAS:Cells:Select()
oAS:Cells:EntireColumn:AutoFit
oAS:Rows( "1:1"):Font:Bold( .t.)
oAS:Cells( n + 1, 1):Value := "Wykonano dla miesiaca " + mc_ksieg
oAS:Range( "B2"):Select()
oExcel:ACTIVEWINDOW:FreezePanes( .t.)
oAs:SaveAs( 'FileName') // you need SAVEAS ...

Reagards,
Marek Horodyski


Zoran Sibinovic

unread,
Dec 20, 2015, 11:44:32 AM12/20/15
to Harbour Users
Hi Qatan,

Great feature indeed !!!

Regards
Zoran

esgici

unread,
Dec 20, 2015, 3:09:52 PM12/20/15
to Harbour Users
Hi Giovanni

An alternative :

From Harbour Changelog; 2009-02-16 17:44 (by Przemyslaw Czerpak)

  * harbour/source/rdd/dbcmd.c
    + added .prg function to create temporary files:

         hb_dbCreateTemp( <cAlias>, <aStruct>, <cRDD>, ;
                          <cCodePage>, <nConnection> ) -> <lSuccess>

      Not all RDDs have to support it. It's verified by support for
      DBI_ISTEMPORARY dbInfo() action.

Ciao 

Giovanni Di Maria

unread,
Dec 20, 2015, 3:12:07 PM12/20/15
to Harbour Users
Thank you very much.!
Giovanni

Marek Horodyski

unread,
Dec 20, 2015, 3:22:22 PM12/20/15
to harbou...@googlegroups.com

Od: "Giovanni Di Maria" <giovanni...@gmail.com>

Do: "Harbour Users" <harbou...@googlegroups.com>;
Wysłane: 21:12 Niedziela 2015-12-20


Temat: Re: [harbour-users] DBF in RAM

Thank you very much.!
Giovanni





Il giorno domenica 20 dicembre 2015 21:09:52 UTC+1, esgici ha scritto:
Hi Giovanni

An alternative :

From Harbour Changelog; 2009-02-16 17:44 (by Przemyslaw Czerpak)

  * harbour/source/rdd/dbcmd.c
    + added .prg function to create temporary files:

         hb_dbCreateTemp( <cAlias>, <aStruct>, <cRDD>, ;
                          <cCodePage>, <nConnection> ) -> <lSuccess>

Hi,

but here is created file. When you run demo from CD, best are HBMEMIO.

Regards,

Marek Horodyski

Reply all
Reply to author
Forward
0 new messages