INI vs. DBF

INI vs. DBF

Postby Otto » Fri Mar 24, 2017 8:42 am

Hello,
for better file handling I am thinking about changing from INI-files to dbf-files as program setup files.
Could there be a problem with dbf-files using as setup files?

Thanks in advance
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6313
Joined: Fri Oct 07, 2005 7:07 pm

Re: INI vs. DBF

Postby ukoenig » Fri Mar 24, 2017 10:41 am

Otto,

I'm using a system.dbf instead reading from a INI
Each user belongs to a record to create his own colors or selected images.
I couldn't notice any problem.

---------- sample -----------------------

FUNCTION LOAD_SYS1()

DBSELECTAREA("SYSTEM")
("SYSTEM")->(DBGOTO(nBenutzer)) // user select

aVal[1] := ("SYSTEM")->nWStyle
aVal[2] := ("SYSTEM")->nWColorF
aVal[3] := ("SYSTEM")->nWColorB
aVal[4] := ("SYSTEM")->nWGradPos
aVal[5] := ("SYSTEM")->lWDirect
aVal[6] := ("SYSTEM")->cWBrush
aVal[7] := ("SYSTEM")->cWImage
aVal[8] := ("SYSTEM")->nWText
aVal[10] := ("SYSTEM")->nWZeit
aVal[11] := ("SYSTEM")->nWDatum
aVal[15] := ("SYSTEM")->cWText
aVal[16] := ("SYSTEM")->lWTextSel
...
...


regards
Uwe :D
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: INI vs. DBF

Postby Rick Lipkin » Fri Mar 24, 2017 1:43 pm

Otto

I have an Enterprise application in State government that is used from different regions through out the State. The application knows nothing about the regional location, so I have no other way of identifying each unique location other than to use a modified .ini . It would be almost pointless to associate a user by location since that user could potentially login from anywhere in the State.

I agree an .ini can be a bit clumsy, but in this case it was the best solution.

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2663
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: INI vs. DBF

Postby cnavarro » Fri Mar 24, 2017 2:58 pm

Personally, I have always used in configuration files, the INI files
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: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: INI vs. DBF

Postby Enrico Maria Giordano » Fri Mar 24, 2017 5:33 pm

Otto wrote:Hello,
for better file handling I am thinking about changing from INI-files to dbf-files as program setup files.
Could there be a problem with dbf-files using as setup files?

Thanks in advance
Otto


The only problem I can see is that is more difficult for the user to make settings. This is not a problem if all settings is done through the application, though.

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

Re: INI vs. DBF

Postby gabo » Sun Mar 26, 2017 4:20 pm

I think the best way is to use SQLite and you can Encrypted the table
At first you detect if it exists if you can not create it and from your application as Enrico says "all settings is done through the application"
Regards
gabo
 
Posts: 128
Joined: Tue Jan 03, 2006 8:31 pm

Re: INI vs. DBF

Postby cnavarro » Tue Mar 28, 2017 11:27 pm

I use INIs with values of keys encrypted
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: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: INI vs. DBF

Postby Carles » Wed Mar 29, 2017 5:53 am

Hi,

Ini files work well for basic application configurations, grid colors, window position, ... which are even easy to manipulate from any editor outside of the application, but in the case of configurations for example referred to user is better in tables.

When you design the maintenance from the tables, at the end you put everything in a parameter table, public and private parameters.
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: 1129
Joined: Fri Feb 10, 2006 2:34 pm
Location: Barcelona


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 58 guests