Page 1 of 1 1
Topic Options
#118296 - 2004-04-20 12:38 PM INI File Limit?
barkingstars Offline
Fresh Scripter

Registered: 2003-01-22
Posts: 11
Just a quick question. I've done some googling and have read that there's a 64KB limit to INI files. Is this the case in Kix too?

I've got a script that uses WriteProfileString and it's possible the file it's creating could get quite big once I put it in our main login script.

Top
#118297 - 2004-04-20 12:51 PM Re: INI File Limit?
AzzerShaw Offline
Seasoned Scripter
****

Registered: 2003-02-20
Posts: 510
Loc: Cheltenham, England
If thats what it says my guess would be yes. As kix doesnt do anything special to the ini file, when it writes line. More than likely it will send back an error of some sorts. But like i said that is a guess

im sure if you test the theory, you will find out
_________________________
If at first you don't succeed, try again. Then quit. There's no use being a damn fool about it. - W.C Fields

Top
#118298 - 2004-04-20 01:11 PM Re: INI File Limit?
barkingstars Offline
Fresh Scripter

Registered: 2003-01-22
Posts: 11
Azzer: that's my instinct too (because I guess Kix is using a windows API to read and write from the INI files).

Anyway, I've got a few spare minutes (don't tell my boss!) so I'm testing the theory now. I'll get back with anything I find out.

In the mean time if anyone out there is using a very large ini file with their scripts then please let me know

Top
#118299 - 2004-04-20 02:48 PM Re: INI File Limit?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
The 64k limit is imposed by WIntendos. NT4/2K/XP/2K3 can deal with larger files but YMMV.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#118300 - 2004-04-20 04:06 PM Re: INI File Limit?
barkingstars Offline
Fresh Scripter

Registered: 2003-01-22
Posts: 11
Thanks Les, some of my very basic testing seems to back up what you say. I seem to be able to write hundreds of kilobytes of data to an INI file and I have no problems at all.

Using ReadProfileString, if I specify a key to look up, works perfectly too. What doesn't work so well is if I specify a blank key to return an entire section of the INI file. When I tried this on a file with 40,000 keys, ReadProfileString returned no data, no error and nothing in @ERRORLEVEL. By adding and removing lines from my test INI file I found that the threshold seems to be approx 6350 keys, or just over 48KB.

Anyway, this is more than I'll ever need!

Top
#118301 - 2004-04-20 04:42 PM Re: INI File Limit?
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
what you are seeing is a limitation of kix, the data is there, just you can not print out LONG strings to the console in kix. check LEN($string) and you will see that the string is not empty, but very large!

split the string into an array for easy handling.

Bryce

Top
#118302 - 2004-04-20 04:48 PM Re: INI File Limit?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I have heard of people breaking the data into separate files and then using some sort of admin script to consolidate the data to SQL. That not only reduces contention but also reduces network traffic since the entire INI file is read into memory.

Others will have client write directly to SQL databases instead but that requires some sort of client to exist on all computers.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 302 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.055 seconds in which 0.024 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org