Of course, of course. It's entirely your choice to use, for example, a compiler that is not C++ standard compliant. Be aware that if you ever have to work with another compiler, you might find that your code stops working. It is possible to continue using Dev-C++ and swap out the compiler for a better one, so that's always an option.
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 ...