DBF TEMPORARY

DBF TEMPORARY

Postby MarcoBoschi » Thu Jul 09, 2015 11:50 am

Dear Friends,
is just a thought and I would like to read your opinions.
Does exist the possibility to create a DBF only in memory (for instance with TEMPORARY clause) for special
purposes such as counting , statistics etc. etc.
It might be useful!
What do you think about that?
Does already exist?

:idea: :?: 8)

Have a nice day!
User avatar
MarcoBoschi
 
Posts: 1015
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: DBF TEMPORARY

Postby nageswaragunupudi » Thu Jul 09, 2015 12:35 pm

HB_DBCreateTemp( cAlias, aStruct, cRDD ) --> lSuccess
... use cAlias like any other alias
CLOSE cAlias at the end
Regards

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

Re: DBF TEMPORARY

Postby MarcoBoschi » Thu Jul 09, 2015 3:52 pm

Very interesting and Very useful
Many thank

Marco
User avatar
MarcoBoschi
 
Posts: 1015
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: DBF TEMPORARY

Postby James Bott » Thu Jul 09, 2015 7:21 pm

Another way to do this is with an array and an array class that emulates the database class.

I started on this years ago and I don't remember if I ever finished it.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: DBF TEMPORARY

Postby nageswaragunupudi » Fri Jul 10, 2015 12:53 am

James Bott wrote:Another way to do this is with an array and an array class that emulates the database class.

I started on this years ago and I don't remember if I ever finished it.

James

I made TArray long back for personal use. One of my friend programmer liked it and he uses extensively than me.
After I learnt about this dbftemp, I am advising him also to use this dbftemp instead of my TArray class. Dbf has more facilties like setting relations and a lot more.
Regards

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

Re: DBF TEMPORARY

Postby James Bott » Fri Jul 10, 2015 2:17 am

Rao,

I made TArray long back for personal use. One of my friend programmer liked it and he uses extensively than me.
After I learnt about this dbftemp, I am advising him also to use this dbftemp instead of my TArray class. Dbf has more facilties like setting relations and a lot more
.

I am going to give it a try. I wrote my TArray specifically so I could use the Report class with an array. It works well for that. I expect the dbftemp would work just as well I expect.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: DBF TEMPORARY

Postby nageswaragunupudi » Fri Jul 10, 2015 3:43 am

James Bott wrote:Rao,

I made TArray long back for personal use. One of my friend programmer liked it and he uses extensively than me.
After I learnt about this dbftemp, I am advising him also to use this dbftemp instead of my TArray class. Dbf has more facilties like setting relations and a lot more
.

I am going to give it a try. I wrote my TArray specifically so I could use the Report class with an array. It works well for that. I expect the dbftemp would work just as well I expect.

James

Having tried both, I advise you to try dbftemp.
Regards

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

Re: DBF TEMPORARY

Postby MarcoBoschi » Fri Jul 10, 2015 7:17 am

I'll test it very soon and then I'll know you if
it's faster than my current system based on an array that run on server

Many thanks
User avatar
MarcoBoschi
 
Posts: 1015
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: DBF TEMPORARY

Postby nageswaragunupudi » Fri Jul 10, 2015 10:34 am

MarcoBoschi wrote:I'll test it very soon and then I'll know you if
it's faster than my current system based on an array that run on server

Many thanks

Nobody said it was faster than array.
Regards

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

Re: DBF TEMPORARY

Postby MarcoBoschi » Fri Jul 10, 2015 11:34 am

Yes of course
User avatar
MarcoBoschi
 
Posts: 1015
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: DBF TEMPORARY

Postby zekasan » Sun Jul 12, 2015 4:05 am

example:

Code: Select all  Expand view


ARQ1:="mem:"+alltrim(NomeUsuario)+"1"

    aStruct_ARQ1:={{  "QTPD", "N", 05, 0 },;
                        {  "QTST", "N", 05, 0 },;
                        {  "QTCL", "N", 05, 0 },;
                        {  "QTD1", "N", 05, 0 },;
                        {  "VLR1", "N", 12, 2 },;
                        {  "QTD2", "N", 05, 0 },;
                        {  "VLR2", "N", 12, 2 },;
                        {  "QTD3", "N", 05, 0 },;
                        {  "VLR3", "N", 12, 2 },;
                        {  "QTD4", "N", 05, 0 },;
                        {  "VLR4", "N", 12, 2 },;
                        {  "VEND", "C", 14, 0 },;
                        {  "NOMV", "C", 40, 0 },;
                        {  "FILX", "C", 02, 0 },;
                        {  "FILI", "C", 02, 0 },;
                        {  "CTRL", "N", 04, 0 },;
                        {  "IMPR", "L", 01, 0 }}

    dbCreate( Arq1, aStruct_ARQ1, "DBFCDX")
   use &ARQ1 alias AREA1 new exclusiv
    inde on FILX+NOMV+VEND to &ARQ1

.
.
.
.
    AREA1->(dbclosearea())
    DBDROP(arq1)


 
five 12.07/xharbour/xdevstudio
User avatar
zekasan
 
Posts: 7
Joined: Fri Feb 22, 2008 12:11 pm

Re: DBF TEMPORARY

Postby Carles » Mon Jul 13, 2015 5:20 am

Marco,

You can use arrayrdd, a rdd that works great for arrays and maybe it can use for your purposes :D


/*
* This is a Array RDD, or Memory RDD.
* It works only in memory and actually supports standard dbf commands
* excepts relations
*/
Salutacions, saludos, regards

"...programar es fácil, hacer programas es difícil..."

UT Page -> https://carles9000.github.io/
Forum UT -> https://discord.gg/bq8a9yGMWh
Skype -> https://join.skype.com/cnzQg3Kr1dnk
User avatar
Carles
 
Posts: 1090
Joined: Fri Feb 10, 2006 2:34 pm
Location: Barcelona

Re: DBF TEMPORARY

Postby James Bott » Mon Jul 13, 2015 1:57 pm

Carles,

Tell us more about ArrayRDD?

Who wrote it?

Where can we get it?

Is there a fee for it?

Can we see an example of it's use?

It sounds interesting.

Regards,
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 » Mon Jul 13, 2015 2:37 pm

James,

/*
* Harbour Project source code:
* ARRAY RDD
*
* Copyright 2006 Francesco Saverio Giudice <info / at / fsgiudice / dot / com>
* Copyright 2011-2013 Quique <quique@quiquesoft.com> (Index, locate and filter Support)


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

Re: DBF TEMPORARY

Postby Carles » Mon Jul 13, 2015 3:13 pm

James,

You can see it in folder .\core-master\src\rdd\usrrdd\rdds\arrayrdd.prg and you can use it the same way other rdd
Salutacions, saludos, regards

"...programar es fácil, hacer programas es difícil..."

UT Page -> https://carles9000.github.io/
Forum UT -> https://discord.gg/bq8a9yGMWh
Skype -> https://join.skype.com/cnzQg3Kr1dnk
User avatar
Carles
 
Posts: 1090
Joined: Fri Feb 10, 2006 2:34 pm
Location: Barcelona

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Silvio.Falconi and 80 guests