Do you mean the address contained in the pointer or the object to which it points. What kind of pointer do you have in mind? Writing the address to a file is useless because it cannot be simply read back in later and expect it to point to the same place it was originally. The operating system has probably shuffled memory around in the meantime.
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 ...