Hello
I am trying to figure out why I am getting the error:
Array variable has incorrect number of subscripts or subscript dimension range is incorrect
And how to fix it.
Here is my code:
Thanks
Grimm
I am trying to figure out why I am getting the error:
Array variable has incorrect number of subscripts or subscript dimension range is incorrect
And how to fix it.
Here is my code:
[ autoit ]
Func mysql($branch) ; , $element) ; establish an array with too many elements Local $output[80] ; establish a counter starting at zero $count = 0 ; put query together $sql = _MySQLConnect("DHCP","1234","test","192.168.26.18") $var = _Query($sql,"SELECT * FROM Leases WHERE Branch='" & $branch & "'") With $var ;loop through the query result While NOT .EOF ;put data into array $output[$count]=.Fields("IP").value ; This is where the error is. ;increment the counter $count += 1 ; end of the loop wend ; resize the array to the number of elements ReDim $output[$count] EndWith ; return the proper sized array return $output EndFunc
Thanks
Grimm