Sign in to follow this  
Followers 0
waardd

Is there a array limit?

7 posts in this topic

Hi there,

Im stumbling upon a problem.

I have a file with several arrayentrys wich i load in to my arry with a function. But when i read thge array with the combobox it displays only a part of the lines?

I have a total of 677 lines and the last entry in my combo is line 524

File to read:

[sERVERLIJST]

key1=aardslang rbf (A)|AIX|A|rbf|aardslang.mydomain

.

.

.

key677=xat1 ssox (O)|AIX|O|ssox|xat1.mydomain

My functions to load array and send array to combo are:

Func _populateARRAY()
    ; Get the entries
    Local $srvREAD = IniReadSection("c:\mvdd\settings\serverlijst.ini", "SERVERLIJST")
    ; Size the Global array correctly
    Global $ASservers[$srvREAD[0][0] + 1][6]
    ; Declare this Local array outside the loop
    Local $srvREAD2
    For $i = 1 To $srvREAD[0][0]
        ; Split the delimited string into an array
        $srvREAD2 = StringSplit($srvREAD[$i][1], "|")
        ; Now add the elements to the Global array
        For $j = 1 To $srvREAD2[0]
            $ASservers[$i][$j] = $srvREAD2[$j]
        Next
    Next

EndFunc   ;==>_populateARRAY

Func _FillCombo()
$sServer_Data = ""
For $i = 1 To UBound($ASservers) - 1
    $sServer_Data &= "|" & $ASservers[$i][1]
Next

GUICtrlSetData($Cmb_Servers, $sServer_Data)
EndFunc

My combois formatted as:

$Cmb_Servers = GUICtrlCreateCombo("Cmb_Servers", 90, 15, 160, 25, BitOR($CBS_DROPDOWNLIST,$WS_VSCROLL, $CBS_SORT))

Share this post


Link to post
Share on other sites



You might have been hit by the 32k limit of InIReadSection: "Only the first 32767 chars are read for legacy reasons."

Insert

_ArrayDisplay($srvRead)
after
Local $srvREAD = IniReadSection("c:mvddsettingsserverlijst.ini", "SERVERLIJST")
and see what you get.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

What i get is the first 524 lines of my list.

If i'm correct its 33274 characters in total (including the keynn=).... so it could be that it is running into a limitation...

Damn......

Any suggestions?

Share this post


Link to post
Share on other sites

Use _FileReadToArray in combination with StringSplit.

Or a simple FileReadLine


Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Give a try. It handles INI files without the 32K limitation.

Edited by water
1 person likes this

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Thanks to Water!!! That UDF did the trick. It read the complete file!!! Tnx

Share this post


Link to post
Share on other sites
:D

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0