In the first, the global array is likely to be stored in the BSS (uninitialized data) segment of the executable file itself while the local array is more likely to be drawn from the stack at runtime. Because stack space is already allocated to the executable in one way or another, local variables don't contribute extra bytes to the size of the file.
In the first, variable declared is an extern; unless it is assigned a value the memory will not be allocated. In the second,variable is a local to the block and in 'c' execution starts from main() soon after variable is declared; memory space is occupied for 8000 addresses.
In the first, variable declared is an extern; unless it is assigned a value the memory will not be allocated.
That's incorrect. Even for variables declared as extern, an object will be linked to it when creating the executable, and the object has a size that will contribute to the executable if it's stored in either the data or BSS segment.
In this case linkage is pretty much irrelevant to the question.
 Unless there's no actual object, in which case the linker will puke all over your code if you try to use the variable anywhere.
Dim Adapter As New OleDbDataAdapter
Dim Command As New OleDbCommand
Dim xFrom As String = dtpFrom.Value.ToString.Substring(0, dtpFrom.Value.ToString.IndexOf(" "))
Dim xTo As String = dtpTo.Value.ToString.Substring(0, dtpTo.Value.ToString.IndexOf(" "))
sqlQuery = MainQuery ...