Virtual strings in DBF

Virtual strings in DBF

Postby Natter » Thu Sep 28, 2023 9:05 am

Is it possible to work with virtual (not physical) strings in DBF ?
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: Virtual strings in DBF

Postby Antonio Linares » Thu Sep 28, 2023 9:27 am

Dear Yuri,

What is a virtual string ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Virtual strings in DBF

Postby Natter » Thu Sep 28, 2023 9:49 am

Something like that:
In the open DBF (In exclusive mode), we add lines, but do not save them to disk.
These lines exist only while the database is open.
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: Virtual strings in DBF

Postby Carles » Thu Sep 28, 2023 10:45 am

Natter,

Prueba de usar el rddarray

C.
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: Virtual strings in DBF

Postby Natter » Thu Sep 28, 2023 11:05 am

Thanks for the advice. Is it possible to learn more about using RddArray ?
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: Virtual strings in DBF

Postby Carles » Thu Sep 28, 2023 11:24 am

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: Virtual strings in DBF

Postby Natter » Thu Sep 28, 2023 11:37 am

If I understood correctly, then we are talking about creating a DBF in memory and working with it.
If so, then this is not exactly what I need. I need to open an existing DBF on disk (which already has some strings) and
add virtual strings to it. I.e., the physical strings of this DBF will be available to everyone, and the virtual ones only to me.
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: Virtual strings in DBF

Postby Carles » Thu Sep 28, 2023 12:19 pm

Then u could use triggers with rdd. Every time update a field then it will update a dbf tmp with the same struct.

C.
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: Virtual strings in DBF

Postby Carles » Thu Sep 28, 2023 12:25 pm

And before ask me, here example of use it

https://github.com/harbour/core/blob/ma ... logrdd.prg

C.
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: Virtual strings in DBF

Postby Jimmy » Thu Sep 28, 2023 1:08 pm

hi Natter.

what about "GhostRec" :idea:
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1585
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Virtual strings in DBF

Postby Natter » Thu Sep 28, 2023 1:32 pm

What is this ?
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: Virtual strings in DBF

Postby Jimmy » Thu Sep 28, 2023 3:34 pm

hi Natter,

"GhostRec" -> EOF() + 1
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1585
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Virtual strings in DBF

Postby Natter » Thu Sep 28, 2023 6:36 pm

Thank you, Jimmy, Interesting idea !
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 101 guests