INI vs. DBF

Post Reply
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

INI vs. DBF

Post by Otto »

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

********************************************************************
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: INI vs. DBF

Post by ukoenig »

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
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: INI vs. DBF

Post by Rick Lipkin »

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
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: INI vs. DBF

Post by cnavarro »

Personally, I have always used in configuration files, the INI files
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: INI vs. DBF

Post by Enrico Maria Giordano »

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
gabo
Posts: 117
Joined: Tue Jan 03, 2006 8:31 pm

Re: INI vs. DBF

Post by gabo »

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
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: INI vs. DBF

Post by cnavarro »

I use INIs with values of keys encrypted
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
User avatar
Carles
Posts: 937
Joined: Fri Feb 10, 2006 2:34 pm
Location: Barcelona
Contact:

Re: INI vs. DBF

Post by Carles »

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..."

https://modharbour.app
https://modharbour.app/compass
https://forum.modharbour.app
Post Reply