Hello,
I have been working on a script to gather a bunch of network device data and storing it in an INI file. I have it working for what I was trying to do, however I now hit the limit of 32767 characters, so there is no way I am going to be able to store information on 10,000+ devices in an INI file.
I had, by mistake thought that the 32767 limit was per section - not the whole file.
Does anyone have any suggestions on how I could store a large number of records in a human readable file?
A SQLLite database may be an option, but I do not have much SQL exposure, so building queries to extract the data I am looking for would be challenging.
Here is an example of a section that I am storing...
[ExampleList]
ExampleDevice=DeviceName;IPAddress;Maker;Model;Serial;FWVersion;Driver;Modified
I create Single array to handle this by doing this
$Array = BuildArray()
Func BuildArray()
$Local = IniReadSection($ConfigPath,"PrinterList")
$x = $Local[0][0] +1
ReDim $Local[$x][9]
For $x = 1 to $Local[0][0]
$Temp = StringSplit($Local[$x][1],";")
$Local[$x][1] = $Temp[1]
$Local[$x][2] = $Temp[2]
$Local[$x][3] = $Temp[3]
$Local[$x][4] = $Temp[4]
$Local[$x][5] = $Temp[5]
$Local[$x][6] = $Temp[6]
$Local[$x][7] = $Temp[7]
$Local[$x][8] = $Temp[8]
Next
Return($Local)
EndFunc
....
Like I said, the above works just fine, however an INI file with the built in INI functions are just not going to cut it as I can only store about 300 devices worth before reaching the character limit.
Any ideas or suggestions would be appreciated.
Thanks!
I have been working on a script to gather a bunch of network device data and storing it in an INI file. I have it working for what I was trying to do, however I now hit the limit of 32767 characters, so there is no way I am going to be able to store information on 10,000+ devices in an INI file.
I had, by mistake thought that the 32767 limit was per section - not the whole file.
Does anyone have any suggestions on how I could store a large number of records in a human readable file?
A SQLLite database may be an option, but I do not have much SQL exposure, so building queries to extract the data I am looking for would be challenging.
Here is an example of a section that I am storing...
[ExampleList]
ExampleDevice=DeviceName;IPAddress;Maker;Model;Serial;FWVersion;Driver;Modified
I create Single array to handle this by doing this
$Array = BuildArray()
Func BuildArray()
$Local = IniReadSection($ConfigPath,"PrinterList")
$x = $Local[0][0] +1
ReDim $Local[$x][9]
For $x = 1 to $Local[0][0]
$Temp = StringSplit($Local[$x][1],";")
$Local[$x][1] = $Temp[1]
$Local[$x][2] = $Temp[2]
$Local[$x][3] = $Temp[3]
$Local[$x][4] = $Temp[4]
$Local[$x][5] = $Temp[5]
$Local[$x][6] = $Temp[6]
$Local[$x][7] = $Temp[7]
$Local[$x][8] = $Temp[8]
Next
Return($Local)
EndFunc
....
Like I said, the above works just fine, however an INI file with the built in INI functions are just not going to cut it as I can only store about 300 devices worth before reaching the character limit.
Any ideas or suggestions would be appreciated.
Thanks!