surely it will give you the address because int *i; is a pointer int variable
where i holds the address you should study pointers deeply before using it with structures.
use *(p.i) it will work but it is not a right way to learn language pointers are the most difficult topic in c language so don't take it easily.
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 ...