FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour INI vs. DBF
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
INI vs. DBF
Posted: Fri Mar 24, 2017 08: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

Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: INI vs. DBF
Posted: 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 :-)
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.
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: INI vs. DBF
Posted: Fri Mar 24, 2017 01: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

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: INI vs. DBF
Posted: Fri Mar 24, 2017 02: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
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: INI vs. DBF
Posted: Fri Mar 24, 2017 05: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
Posts: 128
Joined: Tue Jan 03, 2006 08:31 PM
Re: INI vs. DBF
Posted: Sun Mar 26, 2017 04: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

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: INI vs. DBF
Posted: 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
Posts: 1283
Joined: Fri Feb 10, 2006 02:34 PM
Re: INI vs. DBF
Posted: Wed Mar 29, 2017 05: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
HIX -> https://github.com/carles9000/hix

Continue the discussion